:root {
  color-scheme: light;
  --wine: #7f172a;
  --wine-deep: #5f0d1d;
  --wine-soft: #f8eef0;
  --ink: #201e20;
  --muted: #756f72;
  --line: #e9e4e5;
  --panel: #ffffff;
  --quiet: #f8f7f7;
  --shadow: 0 14px 38px rgba(50, 19, 26, .075);
  --topbar: 76px;
  --rail: 82px;
  --sidebar: 123px;
  /* Reported directly ("The system and typing fonts must be cleared and nice size ... make it nice
     modern and aligned"): one modern font everywhere - each device's own system UI face (San
     Francisco on Apple, Segoe UI Variable on Windows, Roboto on Android). */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--font-ui);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; background: #fff; }
html { scroll-behavior: smooth; }
/* The browser's own 16px, written here so the text that is not given a size of its own follows Tools · Text size too
   (text-size.mjs). */
body { margin: 0; min-width: 320px; overflow: hidden; background: #fff; color: var(--ink); font-size: calc(16px * var(--avis-text, 1)); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid rgba(127, 23, 42, .35); outline-offset: 2px; }
/* Reported directly: "none of the buttons are responsive... missing the click effect" - every
   button on this page relied only on whatever its own specific class did on :hover, and none of
   those (nor this base rule) had a :active state at all, so a press gave no feedback the click
   even registered. One rule, targeting every real <button> regardless of which other class it
   also carries, so it never needs repeating per component. Deliberately scoped to `button` only,
   not a broader `[role=button]` selector - a few custom controls (AVI's own character, see
   avi-widget.css) already use `transform` for real positioning, and a blanket transform here
   would clobber that instead of adding to it; each of those gets its own composed :active rule
   instead. */
button:not(:disabled):active { transform: scale(.96); filter: brightness(.92); }
@media (prefers-reduced-motion: no-preference) { button { transition: transform .08s ease, filter .08s ease; } }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: fixed; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { height: 100%; display: grid; grid-template: var(--topbar) minmax(0, 1fr) / var(--rail) var(--sidebar) minmax(0, 1fr); background: #fff; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; min-width: 0; padding: 0 22px 0 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); z-index: 30; }
.brand { width: calc(var(--rail) + var(--sidebar) - 18px); flex: 0 0 auto; border: 0; background: transparent; display: flex; align-items: center; gap: 13px; text-align: left; padding: 0; }
.avisphare-logo { width:48px; height:48px; display:block; object-fit:contain; border:0; background:transparent; }
/* Reported directly: "Use small letters: "Artificial Vision Intelligent System" Must fits in length with A.V.I.S." The
   lockup is as wide as A.V.I.S (its one column, the spacing after the last letter taken off); the small line below is
   spread over that width, edge to edge. A.V.I.S is spaced wide enough for the line to fit in any of the system fonts. */
.brand-copy { display: grid; width: max-content; gap: 3px; min-width: 0; }
.brand-copy strong { margin-right: -.36em; color: var(--wine-deep); font-size: calc(22px * var(--avis-text, 1)); line-height: 1; letter-spacing: .36em; }
.brand-copy small { width: 0; min-width: 100%; overflow: hidden; white-space: nowrap; text-align: justify; text-align-last: justify; color: var(--muted); font-size: calc(7.5px * var(--avis-text, 1)); line-height: 1.2; letter-spacing: 0; }
/* Reported directly: "Remove the black header on the web APP" - in the installed app's window without a title bar
   (title-bar.mjs) this bar is the window's title bar: it moves the window, and its buttons keep clear of Chrome's at the
   right (and of a Mac's three lights at the left). Its own A.V.I.S stands at its left; the words beside Chrome's buttons
   only where it is away (the sign-in screen, a window of one suite). */
.avis-titlebar .topbar { padding-left: calc(18px + env(titlebar-area-x, 0px)); padding-right: calc(22px + 100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw)); -webkit-app-region: drag; app-region: drag; }
.avis-titlebar .topbar * { -webkit-app-region: no-drag; app-region: no-drag; }
/* Reported directly: "do not mount a title bar on an window" - a window of the AVIS desktop app has no bar of the
   computer's (electron/main.js openAppWindow): the page's own header moves it; its buttons and fields stay its own. */
.avis-app-window :is(.chat-find, #chatHead, .chat-list-head, dialog > header, dialog > div > header, .documents-window-bar, .list-header) { -webkit-app-region: drag; app-region: drag; }
.avis-app-window :is(.chat-find, #chatHead, .chat-list-head, dialog > header, dialog > div > header, .documents-window-bar, .list-header) :is(button, a, input, textarea, select, label, [contenteditable], [role="button"]) { -webkit-app-region: no-drag; app-region: no-drag; }
.avis-titlebar body:not(.embed-documents, .embed-messages, .embed-mail) .avis-title { display: none; }
.global-search { height: 42px; flex: 1 1 520px; max-width: 720px; min-width: 180px; display: flex; align-items: center; gap: 10px; padding: 0 11px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--quiet); color: #8d8588; }
.global-search:focus-within { background: white; border-color: rgba(127,23,42,.42); box-shadow: 0 0 0 3px rgba(127,23,42,.06); }
.global-search svg { width: 18px; height: 18px; }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: calc(14px * var(--avis-text, 1)); }
.global-search input::placeholder { color: #999194; }
kbd { border: 1px solid #ded8da; border-radius: 5px; padding: 2px 6px; background: white; color: #948d90; font-size: calc(11px * var(--avis-text, 1)); font-family: inherit; }
.top-actions { margin-left: auto; padding-left: 18px; display: flex; align-items: center; gap: 9px; }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; position: relative; }
.icon-button:hover { color: var(--wine); }
.avis-trigger { height: 39px; padding: 0 14px; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(127,23,42,.34); border-radius: 10px; background: white; color: var(--wine); font-size: calc(13px * var(--avis-text, 1)); font-weight: 650; }
.avis-trigger:hover { background: var(--wine-soft); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--wine); box-shadow: 0 0 0 4px rgba(127,23,42,.11); }
.profile-button { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0 0 0 4px; border: 0; background: transparent; text-align: left; }
.profile-control { display: grid; grid-template-columns: auto; justify-items: start; min-width: 0; }
/* Expired sessions use headerLogin. */
.top-login { margin: 2px 0 0 4px; color: var(--wine); font-size: calc(11px * var(--avis-text, 1)); font-weight: 650; line-height: 1; text-decoration: none; }
.top-login:hover { text-decoration: underline; }
/* Reported directly: "if someone is signed in as admin then shows on the left side top in AVISPhare the word ADMIN (or Super
   admin only for me)"; and the white glass app icon to the 3 apps, from there the register page to sign in and out. */
.admin-word { flex: 0 0 auto; padding: 0 6px; border: 0; background: transparent; color: var(--wine); font-family: inherit; font-size: calc(12px * var(--avis-text, 1)); font-weight: 750; letter-spacing: .14em; white-space: nowrap; cursor: pointer; }
.admin-word:hover { text-decoration: underline; text-underline-offset: 3px; }
.apps-icon img { display: block; width: 30px; height: 30px; }
#adminRoleLabel { max-width: 100%; line-height: 1.2; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .profile-copy { max-width: min(35vw, 180px); }
  .profile-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #adminLauncher { flex: 0 0 84px; padding: 2px; gap: 2px; }
  #adminLauncher img { width: 28px !important; height: 28px !important; }
}
@media (max-width: 700px) {
  .topbar .global-search { min-width: 36px; flex: 1 1 80px; padding-inline: 8px; gap: 4px; }
  .topbar .global-search input { width: 0; }
  .topbar .top-actions { flex-shrink: 0; padding-left: 6px; }
}
.profile-copy { display: flex; flex-direction: column; min-width: 0; }
.profile-copy strong { font-size: calc(12px * var(--avis-text, 1)); font-weight: 650; }
.mobile-menu { display: none; margin-right: 10px; }

.app-rail { grid-row: 2; padding: 18px 11px 12px; display: flex; flex-direction: column; align-items: stretch; gap: 7px; border-right: 1px solid var(--line); background: #fff; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; -webkit-overflow-scrolling:touch; z-index: 20; }
.rail-item { min-height: 57px; padding: 7px 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: #716b6d; }
.rail-item svg { width: 19px; height: 19px; }
.rail-item img { width:48px; height:48px; display:block; object-fit:contain; }
.rail-item span { font-size: calc(10px * var(--avis-text, 1)); line-height: 1; }
.rail-item:hover { color: var(--wine); background: var(--wine-soft); }
.rail-item.active { border-color: rgba(127,23,42,.22); color: var(--wine); background: #fff; box-shadow: 0 7px 18px rgba(76,25,34,.08); }
.rail-item.active svg { stroke-width: 2; }
.rail-end { margin-top: auto; }

.mail-nav { grid-row: 2; padding: 20px 16px 16px; min-width: 0; border-right: 1px solid var(--line); background: #fff; overflow-y: auto; overscroll-behavior:contain; scrollbar-gutter:stable; -webkit-overflow-scrolling:touch; z-index: 19; }
.compose-button { width: 100%; height: 45px; padding: 0 16px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--wine); border-radius: 11px; background: var(--wine); color: white; box-shadow: 0 9px 22px rgba(127,23,42,.15); font-size: calc(14px * var(--avis-text, 1)); font-weight: 650; }
.compose-button:hover { background: var(--wine-deep); }
.compose-button svg { width: 18px; height: 18px; }
.compose-button-icon { width: auto; height: auto; padding: 6px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; }
.compose-button-icon:hover { background: var(--wine-soft); }
.compose-button-icon:active .compose-icon { background-color: rgb(35,97,99); }
.compose-icon { width: 76px; height: 87px; display: block; background-color: #a60505; -webkit-mask-image: url(/compose-icon.png); mask-image: url(/compose-icon.png); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.account-switcher { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.account-switcher select { position: absolute; inset: 0; width: 100%; opacity: 0; }
.account-switcher > svg { display: none; }
.folder-group { margin-top: 10px; }
.folder-group + .folder-group { margin-top: 20px; }
/* Reported directly: "I need to manage the links and icons at the left columns in the admin with tickbox what icon
   is visible in user AVISphere". An icon the administration does not show is not there; a group of folders with
   none left loses its title too. */
[data-nav-off] { display: none !important; }
.folder-group:not(:has(.folder-item:not([data-nav-off]))) { display: none; }
.nav-label { margin: 0 10px 7px; color: #9a9295; font-size: calc(10px * var(--avis-text, 1)); font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.folder-item { width: 100%; height: 38px; padding: 0 10px; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #565052; font-size: calc(13px * var(--avis-text, 1)); text-align: left; }
/* Reported directly, with a photo of the iPad's Mail showing "Inbox" selected as text: a folder pressed long opens it, never selects its name. */
.mail-nav .folder-item { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.folder-item svg { width: 17px; height: 17px; color: #837b7e; }
.added-icon-item img { width: 17px; height: 17px; flex: none; object-fit: contain; }
.folder-item span { flex: 1; }
.folder-item strong { color: #9a9294; font-size: calc(11px * var(--avis-text, 1)); }
.folder-item:hover { color: var(--wine); background: white; }
.folder-item.active { border-color: rgba(127,23,42,.18); background: white; color: var(--wine); box-shadow: 0 5px 16px rgba(70,28,36,.05); font-weight: 650; }
.folder-item.active svg { color: var(--wine); stroke-width: 2; }

.main-surface { grid-column: 3 / 4; grid-row: 2; min-width: 0; min-height: 0; overflow:hidden; background:#fff; }
.view-panel { height: 100%; }
.app-shell.landing-active { grid-template-rows:var(--topbar) auto minmax(0,1fr); }
/* The signed-in start page keeps the regular top bar (logo, search, account); only the sign-in
   screen hides it. */
.app-shell.landing-active .app-rail,.app-shell.landing-active .mail-nav,.app-shell.landing-active .main-surface { grid-row:3; }
/* Reported directly: "on the right side there is a button half covered" - the Email heading and its New
   message button take their full height; the mailbox starts below them. */
.app-shell.landing-active .main-surface { display:grid; grid-template-rows:max-content minmax(520px,1fr); overflow-y:auto; background:#fff; }
.corporate-landing { height:auto; min-height: 0; padding: clamp(18px,2.5vw,36px); overflow:visible; background:#fff; }
/* Reported directly: "mount the marketplace header menu at the same place. The images must have shadow
   and strong responsive and remove the transparent frame from the menu" - the marketplace's own menu,
   without its glass frame: each picture carries its own shadow. Then reported: "the menu must be a
   scroller" - each picture keeps its size and the row moves on by itself (app.js), on every screen. */
.app-header-menu { position:relative; z-index:3; grid-column:1/-1; grid-row:2; min-width:0; padding:12px clamp(12px,2vw,28px) 0; background:#fff; border-bottom:1px solid var(--line); }
.app-header-menu[hidden] { display:none; }
/* Reported directly: "make me on all scrollers where appearing images the start of the appearing very soft not as a hard
   cut" - the row fades over its two edges (src/soft-edges.mjs writes the same mask), its padding as wide as the fade. */
.app-header-menu-strip { display:flex; gap:clamp(8px,1vw,14px); margin:0 -10px; padding:6px 40px 22px; overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:none; -webkit-overflow-scrolling:touch; -webkit-mask-image:linear-gradient(90deg,transparent,#000 var(--soft-start,40px),#000 calc(100% - var(--soft-end,40px)),transparent);mask-image:linear-gradient(90deg,transparent,#000 var(--soft-start,40px),#000 calc(100% - var(--soft-end,40px)),transparent); }
.app-header-menu-strip::-webkit-scrollbar { display:none; }
.app-header-menu-strip a { display:block; flex:0 0 clamp(150px,13vw,230px); aspect-ratio:1.6; border-radius:10px; overflow:hidden; box-shadow:0 8px 18px rgba(34,20,23,.32),0 2px 5px rgba(34,20,23,.2); transition:transform .2s ease,box-shadow .2s ease; }
.app-header-menu-strip img { width:100%; height:100%; display:block; object-fit:cover; }
.app-header-menu-strip a:hover,.app-header-menu-strip a:focus-visible { transform:translateY(-3px); box-shadow:0 14px 28px rgba(34,20,23,.38),0 3px 8px rgba(34,20,23,.22); }
@media (max-width: 700px) { .app-header-menu { padding:8px 8px 0; } .app-header-menu-strip { gap:8px; margin:0 -8px; padding-inline:24px; -webkit-mask-image:linear-gradient(90deg,transparent,#000 var(--soft-start,24px),#000 calc(100% - var(--soft-end,24px)),transparent);mask-image:linear-gradient(90deg,transparent,#000 var(--soft-start,24px),#000 calc(100% - var(--soft-end,24px)),transparent); } .app-header-menu-strip a { flex-basis:clamp(118px,34vw,150px); } }
/* The last stores this device has seen (renderLastStores): three pictures in a row, each with its store's name. */
.last-stores { margin:0 0 clamp(14px,2vw,22px); }
.last-stores[hidden] { display:none; }
/* With the Email heading and its New message button gone ("remove the header text remove the red button"), the start
   holds only the last stores: with none to show, it takes no room above the mailbox. */
.corporate-landing:not(:has(> .last-stores:not([hidden]))) { padding:0; }
.last-stores-row { display:grid; grid-template-columns:repeat(3,minmax(0,200px)); gap:clamp(8px,1.2vw,16px); }
.last-stores-row a { display:grid; gap:6px; min-width:0; color:var(--ink); text-decoration:none; }
.last-store-picture { display:grid; place-items:center; aspect-ratio:1.6; overflow:hidden; border-radius:10px; background:var(--wine-soft); color:var(--wine); font-size:calc(26px * var(--avis-text, 1)); font-weight:700; box-shadow:0 8px 18px rgba(34,20,23,.22),0 2px 5px rgba(34,20,23,.14); }
.last-store-picture img { display:block; width:100%; height:100%; object-fit:cover; }
.last-store-name { overflow:hidden; font-size:calc(13px * var(--avis-text, 1)); font-weight:650; white-space:nowrap; text-overflow:ellipsis; }
.app-shell.landing-active .mail-workspace { height:clamp(520px,72dvh,900px); min-height:520px; border-top:1px solid var(--line); }
.mail-workspace { height:100%; display:grid; grid-template-columns:minmax(310px,34%) minmax(0,1fr); min-height:0; overflow:hidden; }
.message-list-panel { min-width:0; min-height:0; overflow:hidden; display:grid; grid-template-rows:auto auto minmax(0,1fr); border-right:1px solid var(--line); background:white; }
.list-header { min-height: 84px; padding: 19px 18px 14px 21px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 5px; color: var(--wine); font-size: calc(10px * var(--avis-text, 1)); font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.hub-header h1, .avis-stage h1, .placeholder-card h1 { margin: 0; font-size: calc(24px * var(--avis-text, 1)); line-height: 1.12; font-weight: 640; letter-spacing: -.025em; }
.list-header-actions { display: flex; gap: 7px; }
/* Reported directly, with the email list on a phone: "Remove branding names and INBOX text" - the mailbox's name and the
   folder's are gone, as is the folder's name over an open email: the list starts at the top. In the AVIS app on a computer
   a thin band above it still moves the window (its page's own header, .avis-app-window above). */
.list-header { min-height: 0; padding: 0; }
.avis-app-window .list-header { min-height: 14px; }
.icon-button.subtle { width: 34px; height: 34px; border-color: transparent; background: transparent; }
.icon-button.subtle:hover { color: var(--wine); }
.list-toolbar { height: 42px; padding: 0 17px 8px 21px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.list-toolbar button { padding: 5px 7px; border: 0; background: transparent; color: #7f787b; font-size: calc(11px * var(--avis-text, 1)); }
.list-toolbar button:hover { color: var(--wine); }
.select-all input { width: 15px; height: 15px; accent-color: var(--wine); }
.message-total { margin-left: auto; color: #9a9395; font-size: calc(10px * var(--avis-text, 1)); white-space: nowrap; }
.message-list { min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; -webkit-overflow-scrolling:touch; touch-action:pan-y pinch-zoom; }
.message-card { width: 100%; min-height: 116px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; padding: 14px 15px 13px 14px; border: 0; border-bottom: 1px solid #eee9ea; border-left: 3px solid transparent; background: white; text-align: left; cursor: pointer; }
.message-card:focus-visible { outline: 2px solid rgba(127,23,42,.35); outline-offset: -2px; }
.message-card:hover { background: #fcf9fa; }
.message-card.selected { border-left-color: var(--wine); background: var(--wine-soft); }
.message-card.unread { background: #fdfafb; }
.message-card.unread .message-sender, .message-card.unread .message-subject { font-weight: 720; color: #241f21; }
.message-check { padding-top: 2px; }
.message-check input { width: 14px; height: 14px; accent-color: var(--wine); }
.message-card-content { min-width: 0; }
.message-card-top { display: flex; align-items: center; gap: 8px; }
.message-sender { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: calc(12px * var(--avis-text, 1)); font-weight: 580; }
.message-time { color: #979093; font-size: calc(10px * var(--avis-text, 1)); white-space: nowrap; }
.message-subject { margin: 8px 0 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #4d4749; font-size: calc(12px * var(--avis-text, 1)); }
.message-preview { margin: 0; display: -webkit-box; overflow: hidden; color: #8a8385; font-size: calc(11px * var(--avis-text, 1)); line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.message-flags { margin-top: 8px; display: flex; align-items: center; gap: 6px; color: #999194; }
.message-flags svg { width: 13px; height: 13px; }
.importance { display: inline-flex; padding: 2px 5px; border-radius: 4px; background: var(--wine-soft); color: var(--wine); font-size: calc(8px * var(--avis-text, 1)); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
/* "Load more" at the end of the mail list: a plain line of text like the rows above it. */
.message-load-more { display: block; width: 100%; padding: 14px; border: 0; background: white; color: var(--wine); font: inherit; font-weight: 600; cursor: pointer; }
.message-load-more:disabled { opacity: .5; cursor: default; }
.list-loading { padding: 18px; }
.list-loading span { height: 86px; margin-bottom: 9px; display: block; border-radius: 8px; background: linear-gradient(90deg,#f5f2f3 20%,#fcfbfb 40%,#f5f2f3 60%); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position-x: -220%; } }
.list-state { padding: 54px 24px; text-align: center; color: var(--muted); }
.list-state svg { width: 28px; height: 28px; color: var(--wine); }
.list-state h3 { margin: 13px 0 7px; color: var(--ink); font-size: calc(15px * var(--avis-text, 1)); }
.list-state p { margin: 0; font-size: calc(12px * var(--avis-text, 1)); line-height: 1.5; }

.reader-panel { min-width: 0; min-height: 0; background: #fff; }
.reader-empty { height: 100%; padding: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.reader-empty[hidden], .message-reader[hidden] { display: none; }
.empty-emblem { width: 65px; height: 65px; display: grid; place-items: center; border: 1px solid rgba(127,23,42,.25); border-radius: 18px; color: var(--wine); box-shadow: var(--shadow); }
.empty-emblem svg { width: 27px; height: 27px; }
.reader-empty h2 { margin: 19px 0 7px; font-size: calc(18px * var(--avis-text, 1)); font-weight: 620; }
.reader-empty p { max-width: 360px; margin: 0; color: var(--muted); font-size: calc(13px * var(--avis-text, 1)); line-height: 1.55; }
.message-reader { height: 100%; min-height: 0; display: grid; grid-template-rows: 56px minmax(0, 1fr); }
.reader-toolbar { padding: 0 19px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.reader-back { display: none; }
.reader-tools { display: flex; align-items: center; gap: 3px; }
.tool-button { height: 34px; padding: 0 9px; display: flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #6e6769; font-size: calc(11px * var(--avis-text, 1)); }
.tool-button svg { width: 16px; height: 16px; }
.tool-button:hover { border-color: var(--line); background: var(--quiet); color: var(--wine); }
.tool-button.danger:hover { color: #a10e25; }
.reader-toolbar > .icon-button:last-child { margin-left: auto; }
/* Reported directly, on an iPad: "the header of the receiving window must be 30% smaller" - the subject, the space around
   it and the sender's mark at seven tenths of what they were; the folder, the time and the sender's name stay readable. */
.reader-content { min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; -webkit-overflow-scrolling:touch; touch-action:pan-y pinch-zoom; padding:22px clamp(24px,4vw,61px) 56px; }
.reader-heading { display: flex; gap: 14px; align-items: flex-start; }
.reader-heading > div { flex: 1; min-width: 0; }
.reader-heading h2 { max-width: 850px; margin: 6px 0 0; font-size: clamp(calc(14px * var(--avis-text, 1)), calc(1.61vw * var(--avis-text, 1)), calc(19.6px * var(--avis-text, 1))); line-height: 1.22; font-weight: 620; letter-spacing: -.02em; overflow-wrap: anywhere; }
.reader-heading time { padding-top: 14px; color: var(--muted); font-size: calc(11px * var(--avis-text, 1)); white-space: nowrap; }
.sender-row { margin-top: 17px; display: flex; align-items: center; gap: 9px; }
.sender-avatar { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: var(--wine-soft); color: var(--wine); font-size: calc(10px * var(--avis-text, 1)); font-weight: 750; text-transform: uppercase; }
.sender-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sender-copy strong { font-size: calc(13px * var(--avis-text, 1)); }
.sender-copy button { max-width: 100%; padding: 0; display: flex; align-items: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font-size: calc(11px * var(--avis-text, 1)); }
.sender-copy button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sender-copy button svg { width: 13px; height: 13px; }
.sender-row > .icon-button { margin-left: auto; }
.recipient-details { margin: 13px 0 0 36px; padding: 12px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfafa; font-size: calc(11px * var(--avis-text, 1)); }
.recipient-details dt { color: #9a9295; }
.recipient-details dd { margin: 0; overflow-wrap: anywhere; color: #5e5759; }
.attachment-list { margin: 19px 0 0 50px; display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-chip { padding: 7px 10px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #5f585b; font-size: calc(10px * var(--avis-text, 1)); }
.attachment-chip svg { width: 14px; height: 14px; color: var(--wine); }
.thread-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--wine-soft); color: var(--wine); font: 700 calc(10px * var(--avis-text, 1))/calc(16px * var(--avis-text, 1)) var(--font-ui); }
.thread-strip { margin: 13px 0 0 50px; border: 1px solid var(--line); border-radius: 8px; background: #fbfafa; overflow: hidden; }
.thread-strip[hidden] { display: none; }
.thread-strip-head { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--wine); font: 700 calc(10px * var(--avis-text, 1))/1 var(--font-ui); text-transform: uppercase; letter-spacing: .04em; }
.thread-strip-head svg { width: 13px; height: 13px; }
.thread-strip-list { max-height: 168px; overflow-y: auto; }
.thread-strip-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 0; border-top: 1px solid var(--line); background: white; color: #5e5759; font-size: calc(11px * var(--avis-text, 1)); text-align: left; cursor: pointer; }
.thread-strip-item:first-child { border-top: 0; }
.thread-strip-item:hover { background: var(--wine-soft); }
.thread-strip-sender { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #241f21; }
.thread-strip-time { flex: none; color: #9a9295; }
.message-body-wrap { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 25px; }
.message-frame { width: 100%; min-height: 120px; border: 0; background: white; }
.plain-message { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #393537; font: calc(14px * var(--avis-text, 1))/1.62 var(--font-ui); }

/* Reported directly, as a "VIP job", with Apple's Mail drawn twice: "MOBILE SCREEN" and "TABLETs & PC pupup free
   floating desk window". On an iPad or a computer the mail is three panes side by side - the
   mailboxes, the messages and the open message - the open message beside the list, never over it (it was a window of
   its own over the list, edge to edge); ⤢ in its toolbar gives it the whole window, and back. On a phone (max-width:
   700px below) one pane at a time, as the iPhone's Mail. */
@media (min-width: 701px) {
  .mail-workspace { grid-template-columns: minmax(300px, 36%) minmax(0, 1fr); }
  .reader-panel { display: block; overflow: hidden; }
  .reader-panel.is-max { position: fixed; z-index: 95; inset: 0; }
  .message-reader { background: #fff; }
}
}


.hub-view, .avis-view, .placeholder-view { min-height: 0; overflow-y: auto; background: #fff; }
.hub-view { padding: clamp(24px, 4vw, 54px); }
.hub-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hub-header h1 { font-size: clamp(calc(26px * var(--avis-text, 1)), calc(3vw * var(--avis-text, 1)), calc(38px * var(--avis-text, 1))); }
.hub-header > div > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: calc(14px * var(--avis-text, 1)); }
.access-badge { padding: 9px 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(127,23,42,.26); border-radius: 9px; color: var(--wine); font-size: calc(11px * var(--avis-text, 1)); white-space: nowrap; }
.access-badge svg { width: 14px; height: 14px; }
.sector-layout { margin-top: 35px; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 23px; align-items: start; }
.sector-grid { display: grid; grid-template-columns: repeat(4, minmax(135px, 1fr)); gap: 13px; }
.sector-tile { min-height: 142px; padding: 17px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid rgba(127,23,42,.3); border-radius: 10px; background: white; box-shadow: 0 9px 24px rgba(60,19,27,.07); text-align: left; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.sector-tile:hover { transform: translateY(-2px); border-color: var(--wine); box-shadow: 0 14px 30px rgba(80,18,31,.11); }
.sector-tile.active { border-color: var(--wine); background: #fdf9fa; box-shadow: 0 0 0 2px rgba(127,23,42,.08), 0 13px 29px rgba(80,18,31,.09); }
.sector-tile > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(127,23,42,.22); border-radius: 8px; color: var(--wine); }
.sector-tile svg { width: 17px; height: 17px; }
.sector-tile strong { margin-top: 19px; font-size: calc(12px * var(--avis-text, 1)); line-height: 1.25; }
.sector-tile small { margin-top: 5px; color: var(--muted); font-size: calc(9px * var(--avis-text, 1)); letter-spacing: .05em; text-transform: uppercase; }
.sector-detail { min-height: 328px; position: sticky; top: 0; padding: 25px; border: 1px solid rgba(127,23,42,.28); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.sector-symbol { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 12px; background: var(--wine); color: white; }
.sector-detail .eyebrow { margin-top: 32px; }
.sector-detail h2 { margin: 0; font-size: calc(23px * var(--avis-text, 1)); font-weight: 640; }
.sector-detail p:last-of-type { color: var(--muted); font-size: calc(13px * var(--avis-text, 1)); line-height: 1.6; }
.sector-actions { margin-top: 25px; display: grid; gap: 8px; }
.sector-actions button { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #5d5658; font-size: calc(11px * var(--avis-text, 1)); }
.sector-actions button:hover { border-color: rgba(127,23,42,.4); color: var(--wine); }

.avis-view { display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(circle at 50% 36%, rgba(127,23,42,.055), transparent 36%), #fff; }
.avis-stage { width: min(780px, 100%); text-align: center; }
.avis-orbit { width: 91px; height: 91px; margin: 0 auto 25px; display: grid; place-items: center; position: relative; border: 1px solid var(--wine); border-radius: 50%; color: var(--wine); box-shadow: 0 18px 50px rgba(127,23,42,.12); }
.avis-orbit::before, .avis-orbit::after { content: ""; position: absolute; border: 1px solid rgba(127,23,42,.18); border-radius: 50%; }
.avis-orbit::before { inset: 9px; }
.avis-orbit::after { inset: 23px; transform: rotate(45deg); border-radius: 9px; }
.avis-orbit span { font-size: calc(25px * var(--avis-text, 1)); font-weight: 680; z-index: 1; }
.avis-stage h1 { color: var(--wine-deep); font-size: clamp(calc(42px * var(--avis-text, 1)), calc(7vw * var(--avis-text, 1)), calc(68px * var(--avis-text, 1))); letter-spacing: .16em; }
.avis-expansion { margin: 8px 0 0; color: #524b4e; font-size: calc(14px * var(--avis-text, 1)); letter-spacing: .05em; }
.avis-intro { max-width: 600px; margin: 19px auto 28px; color: var(--muted); font-size: calc(15px * var(--avis-text, 1)); line-height: 1.55; }
.avis-command { overflow: hidden; border: 1px solid rgba(127,23,42,.34); border-radius: 14px; background: white; box-shadow: var(--shadow); text-align: left; }
.avis-command textarea { width: 100%; padding: 19px; resize: vertical; border: 0; outline: 0; color: var(--ink); font-size: calc(15px * var(--avis-text, 1)); line-height: 1.5; }
.avis-command > div { min-height: 51px; padding: 8px 10px 8px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); }
.avis-command > div span { color: #958d90; font-size: calc(10px * var(--avis-text, 1)); }
.avis-command button { height: 35px; padding: 0 13px; display: flex; align-items: center; gap: 7px; border: 0; border-radius: 8px; background: var(--wine); color: white; font-size: calc(12px * var(--avis-text, 1)); font-weight: 650; }
.avis-command button svg { width: 15px; height: 15px; }
.avis-result { margin-top: 16px; padding: 20px; border: 1px solid rgba(127,23,42,.22); border-radius: 12px; background: white; box-shadow: 0 9px 26px rgba(72,22,31,.06); white-space: pre-wrap; text-align: left; font-size: calc(14px * var(--avis-text, 1)); line-height: 1.6; }

.documents-view { padding: 34px; overflow-y: auto; background: #fcfbfb; }
.drive-connect { display: grid; gap: 10px; margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.drive-connect[hidden] { display: none; }
/* The AVIS app's folders kept in step with the drive (aviscloud-sync.js). */
.drive-sync { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.drive-sync-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.drive-sync-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.drive-sync-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-sync-list small { grid-column: 1; color: var(--muted); font-size: calc(12px * var(--avis-text, 1)); }
.drive-sync-list small.is-warning { color: #9b1c20; }
.drive-sync-tools { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.drive-sync-new { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 560px) { .drive-sync-list li { grid-template-columns: 1fr; } .drive-sync-tools { grid-column: 1; grid-row: auto; justify-content: flex-start; } }
.drive-connect p { margin: 0; color: var(--muted); font-size: calc(13px * var(--avis-text, 1)); }
.drive-connect dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.drive-connect dt { color: var(--muted); font-size: calc(12px * var(--avis-text, 1)); }
.drive-connect dd { margin: 0; min-width: 0; }
.drive-connect code { overflow-wrap: anywhere; user-select: all; }
.drive-connect ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: calc(13px * var(--avis-text, 1)); }
.document-list { display: grid; gap: 10px; color: var(--muted); font-size: calc(12px * var(--avis-text, 1)); }
/* Reported directly: "we have to reforming the AVIS Cloud into a real usable cloud where each user can form his folders
   and sub folders and click review and move between folders by drag and drop docs into" - the AVISCloud's folders. */
.cloud-browser { position: relative; min-height: 320px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.cloud-browser.is-drop-target { outline: 2px dashed var(--wine); outline-offset: -6px; background: var(--wine-soft); }
.cloud-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cloud-path { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; }
.cloud-crumb { padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 600 calc(14px * var(--avis-text, 1)) var(--font-ui); cursor: pointer; }
.cloud-crumb + .cloud-crumb::before { content: "›"; margin-right: 8px; color: var(--muted); font-weight: 400; }
.cloud-crumb[aria-current] { color: var(--ink); font-size: calc(17px * var(--avis-text, 1)); font-weight: 700; }
.cloud-crumb:hover, .cloud-crumb.is-drop-target { background: var(--wine-soft); color: var(--wine); }
.cloud-actions { display: flex; align-items: center; gap: 2px; }
/* Reported directly, with the iPad's Files app as the example (aviscloud-window.js): its bar - back and forward, the
   folder's name, Select, New folder, View, Upload and the drive as plain icons, and Search - and Recents, Shared and
   Browse beneath it; a file or folder chosen with Select marked; how many and the room left at its foot. */
.cloud-steps { display: inline-flex; gap: 2px; }
.cloud-path { flex: 1 1 auto; }
.cloud-tool { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--wine); font: 600 calc(14px * var(--avis-text, 1)) var(--font-ui); cursor: pointer; }
.cloud-tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cloud-tool:hover:not(:disabled) { background: var(--wine-soft); }
.cloud-tool:disabled { color: var(--muted); opacity: .45; cursor: default; }
.cloud-search { flex: 0 1 240px; min-width: 140px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--quiet); color: var(--ink); font: calc(14px * var(--avis-text, 1)) var(--font-ui); outline: 0; }
.cloud-search:focus { border-color: var(--wine); background: #fff; }
.cloud-places { display: flex; gap: 22px; margin: 8px 2px 0; border-bottom: 1px solid var(--line); }
.cloud-places button { margin-bottom: -1px; padding: 6px 0 8px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 600 calc(14px * var(--avis-text, 1)) var(--font-ui); cursor: pointer; }
.cloud-places button[aria-pressed="true"] { border-bottom-color: var(--wine); color: var(--ink); }
.cloud-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 2px 8px; color: var(--muted); font-size: calc(13px * var(--avis-text, 1)); }
#cloudSelected { margin-right: auto; }
.cloud-foot { margin: 12px 2px 0; color: var(--muted); font-size: calc(12px * var(--avis-text, 1)); text-align: center; }
.cloud-status { min-height: 18px; margin: 8px 2px; color: var(--muted); font-size: calc(12px * var(--avis-text, 1)); overflow-wrap: anywhere; }
.cloud-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.cloud-item { position: relative; border: 1px solid transparent; border-radius: 12px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.cloud-item.is-selected, .cloud-item.is-selected:hover { border-color: var(--wine); background: var(--wine-soft); }
.is-selecting .cloud-more { display: none; }
.cloud-item:hover { border-color: var(--line); background: var(--quiet); }
.cloud-item.is-dragging { opacity: .45; }
.cloud-item.is-drop-target { border-color: var(--wine); background: var(--wine-soft); }
.cloud-open { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 12px 10px 10px; border: 0; background: none; color: var(--ink); font: inherit; text-align: center; cursor: pointer; }
.cloud-icon { display: grid; place-items: center; width: 84px; height: 72px; border-radius: 10px; overflow: hidden; background: #f1ecee; color: var(--wine); font: 700 calc(14px * var(--avis-text, 1)) var(--font-ui); letter-spacing: .04em; }
.cloud-icon img { width: 100%; height: 100%; object-fit: cover; }
.is-folder .cloud-icon { background: none; color: #c99a2e; }
.cloud-icon svg { width: 72px; height: 60px; }
.cloud-name { max-width: 100%; font-size: calc(13px * var(--avis-text, 1)); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cloud-meta { color: var(--muted); font-size: calc(11px * var(--avis-text, 1)); }
.cloud-rename { width: 100%; padding: 5px 7px; border: 1px solid var(--wine); border-radius: 7px; font: 600 calc(13px * var(--avis-text, 1)) var(--font-ui); text-align: center; }
.cloud-more { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: calc(18px * var(--avis-text, 1)); line-height: 1; cursor: pointer; opacity: 0; }
.cloud-item:hover .cloud-more, .cloud-more:focus-visible { opacity: 1; background: #fff; }
.cloud-menu { position: absolute; z-index: 5; display: grid; min-width: 190px; max-width: min(340px, 92%); max-height: 320px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.cloud-menu strong { padding: 6px 10px 4px; color: var(--muted); font-size: calc(11px * var(--avis-text, 1)); text-transform: uppercase; letter-spacing: .06em; }
.cloud-menu button { padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: calc(14px * var(--avis-text, 1)) var(--font-ui); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.cloud-menu button:hover, .cloud-menu button:focus-visible { background: var(--wine-soft); color: var(--wine); outline: 0; }
.cloud-menu-none { padding: 9px 10px; color: var(--muted); font-size: calc(13px * var(--avis-text, 1)); }
/* Reported directly, with the iPad's Files app on its columns: "this is how needs to look the AVISCloud ... in columns or
   icons or only listing like the examples". The view and the order chosen from one button, as in Files. */
.cloud-view-button { display: inline-grid; place-items: center; min-width: 42px; padding-inline: 10px; }
.cloud-view-button svg { width: 20px; height: 20px; }
.cloud-menu-line { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--line); }
.cloud-menu :is([role="menuitemradio"], [role="menuitemcheckbox"]) { position: relative; padding-left: 32px; }
.cloud-menu .cloud-file-info { min-width: 240px; padding: 0 10px 4px; }
.cloud-tag-input { margin: 4px 6px 2px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font: calc(14px * var(--avis-text, 1)) var(--font-ui); }
.cloud-menu [aria-checked="true"]::before { content: "✓"; position: absolute; left: 11px; color: var(--wine); font-weight: 700; }
/* List: one row each - its name, then when it changed and how large it is. */
.cloud-items.is-list { grid-template-columns: 1fr; gap: 0; }
.is-list .cloud-item, .is-columns .cloud-item { border-radius: 8px; }
.is-list .cloud-item + .cloud-item { box-shadow: 0 -1px 0 var(--line); }
.is-list .cloud-open { grid-template-columns: 36px minmax(0, 1fr) auto; justify-items: start; align-items: center; gap: 12px; padding: 6px 44px 6px 8px; text-align: left; }
.is-list .cloud-icon { width: 36px; height: 32px; border-radius: 6px; font-size: calc(9px * var(--avis-text, 1)); }
.is-list .cloud-icon svg { width: 32px; height: 28px; }
.is-list .cloud-name { -webkit-line-clamp: 1; }
.is-list .cloud-meta { justify-self: end; white-space: nowrap; }
.is-list .cloud-more, .is-columns .cloud-more { top: 50%; transform: translateY(-50%); }
/* Columns: each folder opened beside the one it is in, the newest on the right; the folder opened in each marked. */
.cloud-items.is-columns { display: flex; gap: 0; min-height: 380px; height: min(64vh, 640px); overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; scroll-behavior: smooth; }
.cloud-column { flex: 0 0 290px; min-width: 0; overflow-y: auto; border-right: 1px solid var(--line); }
.cloud-column > ul { display: grid; gap: 2px; margin: 0; padding: 6px; list-style: none; }
.is-columns .cloud-open { grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; justify-items: start; align-items: center; gap: 0 10px; padding: 6px 42px 6px 6px; text-align: left; }
.is-columns .cloud-icon { grid-row: 1 / 3; width: 40px; height: 36px; border-radius: 6px; font-size: calc(9px * var(--avis-text, 1)); }
.is-columns .cloud-icon svg { width: 36px; height: 30px; }
.is-columns .cloud-name { -webkit-line-clamp: 1; }
.is-columns .cloud-item.is-open { background: var(--wine); border-color: var(--wine); }
.is-columns .is-open .cloud-name, .is-columns .is-open .cloud-meta, .is-columns .is-open .cloud-more { color: #fff; }
.is-columns .is-open .cloud-more { background: none; }
/* The file chosen, in a column of its own as in Files: large, its name, what it is, Open, Download, ⋯, its information. */
.cloud-column.cloud-file { flex: 1 0 320px; display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--quiet); }
.cloud-file-look { display: grid; place-items: center; flex: none; width: 100%; aspect-ratio: 1; max-height: min(260px, 36vh); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--wine); font: 700 calc(28px * var(--avis-text, 1)) var(--font-ui); letter-spacing: .06em; overflow: hidden; cursor: zoom-in; }
.cloud-file-look img { width: 100%; height: 100%; object-fit: contain; }
.cloud-file-name { margin-top: 8px; font-size: calc(18px * var(--avis-text, 1)); line-height: 1.25; overflow-wrap: anywhere; }
.cloud-file-kind { color: var(--muted); font-size: calc(13px * var(--avis-text, 1)); }
.cloud-file-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.cloud-file-heading { margin-top: 10px; color: var(--muted); font-size: calc(15px * var(--avis-text, 1)); }
.cloud-file-info { display: grid; grid-template-columns: auto minmax(0, 1fr); margin: 0; }
.cloud-file-info dt, .cloud-file-info dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--line); font-size: calc(13px * var(--avis-text, 1)); }
.cloud-file-info dt { padding-right: 16px; color: var(--muted); }
.cloud-file-info dd { text-align: right; overflow-wrap: anywhere; }
.cloud-text { width: 100%; margin: 0; padding: 22px; overflow: auto; background: #fff; font: calc(13px * var(--avis-text, 1))/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
/* A touch screen has no hover: the ⋯ is always there; on a phone the folders are rows. */
@media (hover: none) { .cloud-more { opacity: 1; } }
@media (max-width: 560px) {
  .cloud-browser { padding: 10px; }
  .cloud-items:not(.is-icons) { grid-template-columns: 1fr; gap: 2px; }
  .cloud-items:not(.is-icons) .cloud-open { grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; justify-items: start; align-items: center; gap: 2px 12px; padding: 8px 44px 8px 8px; text-align: left; }
  .cloud-items:not(.is-icons) .cloud-icon { grid-row: 1 / 3; width: 48px; height: 44px; font-size: calc(11px * var(--avis-text, 1)); }
  .cloud-items:not(.is-icons) .cloud-icon svg { width: 44px; height: 38px; }
  .cloud-items:not(.is-icons) .cloud-name { -webkit-line-clamp: 1; }
  .cloud-items:not(.is-icons) .cloud-more { top: 50%; transform: translateY(-50%); }
  .is-list .cloud-meta { justify-self: start; }
  /* On a phone, as Files there: icons three to a row, and only the folder open of the columns. */
  .cloud-items.is-icons { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .cloud-items.is-columns { height: auto; min-height: 0; border: 0; }
  .cloud-items.is-columns > .cloud-column:not(:last-child) { display: none; }
  .cloud-column { flex-basis: 100%; border: 0; }
  .cloud-search { flex: 1 1 100%; }
}
.document-card { padding: 14px; display: grid; grid-template-columns: 74px minmax(0,1fr) auto; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 5px 18px rgba(72,22,31,.04); }
.document-card img { width: 74px; height: 74px; }
.document-card .document-image-thumbnail { border-radius: 8px; object-fit: cover; }
.document-card .document-qr { object-fit: contain; }
.document-card h2 { margin: 0 0 5px; color: var(--ink); font-size: calc(15px * var(--avis-text, 1)); }
.document-card code { color: var(--wine); font-size: calc(10px * var(--avis-text, 1)); }
.document-card p { margin: 5px 0; color: var(--muted); font-size: calc(10px * var(--avis-text, 1)); }
.document-card a { color: var(--wine); font-size: calc(11px * var(--avis-text, 1)); font-weight: 650; }
.repository-badge { padding: 5px 8px; border-radius: 20px; background: #f2edef; color: var(--wine); font-size: calc(9px * var(--avis-text, 1)); font-weight: 700; }
.repository-badge.museum { background: #edf3ef; color: #276b49; }
.document-card-controls { display: flex; align-items: flex-end; flex-direction: column; gap: 8px; }
.document-card-controls .secondary-button { height: 30px; padding-inline: 9px; }
.document-dialog { width: min(650px, calc(100vw - 30px)); padding: 0; border: 1px solid rgba(127,23,42,.3); border-radius: 14px; }
.document-dialog::backdrop { background: transparent; backdrop-filter:none; }
.document-dialog-shell > header, .document-dialog-shell > footer { padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.document-dialog-shell header > div { display: flex; flex-direction: column; gap: 3px; }
.document-dialog-shell header small, .document-dialog-shell footer span { color: var(--muted); font-size: calc(10px * var(--avis-text, 1)); }
.document-fields { padding: 18px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.document-fields label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: calc(10px * var(--avis-text, 1)); }
.document-fields input, .document-fields select { min-height: 38px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.document-dialog-shell > footer { border-top: 1px solid var(--line); border-bottom: 0; }

.finance-view { padding: 34px; overflow-y: auto; background: radial-gradient(circle at 90% 0, rgba(127,23,42,.13), transparent 34%), linear-gradient(145deg, #fff 0%, #f8f4f5 100%); }
.connect-view { padding: 34px; overflow-y: auto; background: radial-gradient(circle at 8% 0, rgba(21,125,99,.12), transparent 30%), linear-gradient(145deg, #fff, #f7f4f5); }
.connect-header, .team-chat > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.connect-header h1 { margin: 3px 0 5px; font-size: clamp(calc(28px * var(--avis-text, 1)),calc(4vw * var(--avis-text, 1)),calc(44px * var(--avis-text, 1))); }
.connect-header p { margin: 0; color: var(--muted); }
.connect-layout { position: relative; margin-top: 24px; }
.team-chat { border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 12px 35px rgba(52,27,33,.08); }
.team-chat { min-width:0; display:flex; flex-direction:column; height:calc(100dvh - 230px); min-height:460px; overflow:hidden; }
/* Reported directly: "Ok lets now make the messanger - video call making usable" - the call inside Messages, over its
   contacts and conversation (the whole screen on a phone); small, it floats beside the messages with the other's video. */
.connect-layout { position: relative; }
.chat-call-layer { position: absolute; inset: 0; z-index: 30; background: #141214; }
.chat-call-layer iframe { display: block; width: 100%; height: 100%; border: 0; background: #0d0d0f; color-scheme: dark; }
.chat-call-small { position: absolute; z-index: 2; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #1d1b1c99; color: #fff; cursor: pointer; }
.chat-call-small svg { width: 22px; height: 22px; }
.chat-call-layer.is-small { inset: auto 12px 88px auto; width: 136px; height: 188px; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 34px rgba(20,12,15,.35); }
.chat-call-layer.is-small iframe { pointer-events: none; }
.chat-call-layer.is-small .chat-call-small { inset: 0; width: 100%; height: 100%; border-radius: 0; background: transparent; }
.chat-call-layer.is-small .chat-call-small svg { display: none; }
.team-chat > header { padding: 18px 20px; border-bottom: 1px solid var(--line); flex:0 0 auto; }
.private-message-target { min-width:0; padding:12px 14px; display:flex; align-items:end; gap:10px; border-bottom:1px solid var(--line); flex:0 0 auto; }
.private-message-target label { min-width:0; flex:1; display:grid; gap:5px; color:var(--muted); font-size:calc(10px * var(--avis-text, 1)); font-weight:700; }
.private-message-target select { width:100%; min-width:0; min-height:40px; padding:7px 9px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); }
.team-chat header div { display: grid; gap: 3px; }
.team-chat small, .connect-tools-body p { color: var(--muted); }
.team-message-list { flex:1; min-width:0; min-height:0; max-height:none; height:auto; padding:18px; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; -webkit-overflow-scrolling:touch; touch-action:pan-y pinch-zoom; background:#faf8f9; }
/* Reported directly, with the design uploaded (07 IconMessage): a received message white with a fine grey line, one's
   own rose with a fine rose line, every corner round. */
.team-message-list article { width: min(76%,620px); margin: 0 0 12px; padding: 12px 14px; border: 1px solid #e8e4e5; border-radius: 14px; background: #fff; }
.team-message-list article.own { margin-left: auto; border-radius: 14px; border-color: #d6babe; background: #f7edef; }
.team-message-list article header { display: flex; justify-content: space-between; gap: 10px; font-size: calc(12px * var(--avis-text, 1)); }
.team-message-list article time { color: var(--muted); }
.team-message-list article p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-attachments { margin-top:9px; display:flex; flex-wrap:wrap; gap:8px; }
.message-attachments a { min-width:0; max-width:min(190px,100%); padding:7px; display:grid; gap:5px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--wine); font-size:calc(10px * var(--avis-text, 1)); text-decoration:none; }
.message-attachments img { width:100%; max-height:120px; object-fit:contain; }
.message-attachments video { width:100%; max-height:160px; background:#000; }
.team-chat form { min-width:0; padding: 14px; border-top: 1px solid var(--line); flex:0 0 auto; }
.team-chat textarea { width:100%; min-width:0; min-height:clamp(84px,12dvh,160px); max-height:min(12cm,40dvh); overflow-y:auto; resize: vertical; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.team-chat form > div, .connect-tools-body section > div { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.team-chat .message-file-row { min-width:0; align-items:center; justify-content:flex-start; }
.team-chat .message-file-row input { min-width:0; max-width:100%; }
.team-chat .message-file-row small { font-size:calc(10px * var(--avis-text, 1)); overflow-wrap:anywhere; }

/* Reported directly: "Mount the workspace tool into the toolbox left side down as a row not as a
   column", then "make the Workspace tools window move" - the floating tools window used to
   default to the top-right corner with its two sections (WhatsApp Connector, Phone &
   Connectors) stacked; it now defaults to the bottom-left, next to the toolbox rail/sidebar it
   was reported alongside, with those two sections side by side instead of stacked. Still fully
   draggable afterward (bindFloatingPanelDrag) - this only changes where it starts. */
/* Reported directly: "the workspace window must be closed by default and opening must above the
   video window." Raised above .conference-dialog's z-index:96 so an opened panel is never hidden
   behind an open video call window, and stays below only the toast notifications (z-index:100). */
.connect-tools { position:fixed; left:calc(var(--rail) + var(--sidebar) + 20px); bottom:20px; width:min(640px,calc(100vw - var(--rail) - var(--sidebar) - 40px)); max-height:calc(100dvh - var(--topbar) - 40px); display:flex; flex-direction:column; border:1px solid #9f1831; border-radius:12px; background:#fff; box-shadow:0 28px 70px rgba(13,8,10,.32); overflow:hidden; z-index:97; }
.connect-tools-head { flex:0 0 auto; padding:0 10px 0 16px; height:46px; display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid rgba(127,23,42,.24); background:#fff; box-shadow:0 6px 18px rgba(18,10,12,.06); cursor:grab; font:700 calc(12px * var(--avis-text, 1))/1 var(--font-ui); color:var(--ink); }
.connect-tools-head.dragging { cursor:grabbing; }
.connect-tools-head button { width:26px; height:26px; flex:0 0 auto; border:0; background:transparent; display:grid; place-items:center; cursor:pointer; color:var(--muted); }
.connect-tools-body { min-height:0; padding:14px; display:flex; flex-direction:row; align-items:stretch; gap:14px; overflow:auto; }
.connect-tools-body > section { flex:1 1 0; min-width:0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.connect-tools-body h2 { margin: 4px 0 7px; font-size: calc(15px * var(--avis-text, 1)); }
.connect-tools-body label { display: grid; gap: 6px; margin: 15px 0 10px; font-size: calc(12px * var(--avis-text, 1)); font-weight: 700; }
.connect-tools-body input { min-height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.contact-list { max-height: 160px; margin-top: 12px; overflow-y: auto; display: grid !important; justify-content: stretch !important; gap: 6px !important; }
.contact-list label { margin: 0; padding: 8px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; background: #faf8f9; font-size: calc(10px * var(--avis-text, 1)); font-weight: 500; }
.contact-list input { min-height: auto; }
/* Video conference: a real floating, draggable, resizable call window (dialog + bindDialogDrag,
   the same pattern as the Letter Creator and Contact Incubator) rather than an inline page
   section. Reported directly: "The white column at the right video screen emigrate to below the
   dark buttons of the video screen into 2 new row", then "distribute all the buttons into exact
   aligned block of 2 rows" - the room/invite panel used to sit beside the video as its own
   column; every button (video controls and room/invite actions alike) now sits below the video
   in one single 8-column grid (.conference-buttons-grid) that resolves to exactly 2 rows - see
   the HTML comment above #conferenceDialog. */
/* Reported directly ("always blocked by another window"): this used to sit at a fixed z-index:96,
   ABOVE Contact Incubator/Letter Creator/the template gallery's own z-index:95 - no matter which
   of those a visitor had just clicked to the front (bringDialogToFront only reorders DOM position,
   which only decides stacking between elements that already share one z-index), this one could
   never go behind them. Same z-index as the other three now, so focus genuinely determines
   stacking between any pair of them; .connect-tools' own z-index:97 still sits above all four by
   design (see its own comment). */
/* Reported directly ("Just make all windows full size... opens full screen size or I can drag it
   how I want"): the DEFAULT open width/height, previously capped at a fixed 1180x760px regardless
   of screen size, now matches the same full-viewport ceiling the other top-level windows (Contact
   Incubator, Letter Creator) default to - the standard desktop convention of a maximized launch the
   user can still freely drag/resize smaller afterward. */
.conference-dialog { position:fixed; inset:0; z-index:95; width:calc(100vw - 28px); height:calc(100dvh - 28px); margin:auto; padding:0; overflow:hidden; border:1px solid #9f1831; border-radius:14px; background:#171017; box-shadow:0 32px 100px rgba(13,8,10,.5); box-sizing:border-box; }
.conference-dialog-shell { height:100%; display:flex; flex-direction:column; }
/* Reported directly, with the design uploaded (07 IconMessage): the video conference's bar is white as the Messages
   window's, its full screen and × the design's icons, plain. */
.conference-dialog-header { flex:0 0 auto; padding:0 10px 0 20px; height:56px; display:flex; align-items:center; justify-content:space-between; gap:10px; background:#fff; border-bottom:1px solid #f5f3f4; cursor:grab; color:#222; }
.conference-dialog-header.dragging { cursor:grabbing; }
.conference-dialog-identity { display:flex; align-items:center; gap:8px; min-width:0; }
.conference-dialog-identity img { width:28px; height:33px; flex:0 0 auto; object-fit:contain; }
.conference-dialog-identity span { display:flex; flex-direction:column; gap:1px; min-width:0; }
.conference-dialog-identity strong { font-size:calc(13px * var(--avis-text, 1)); letter-spacing:.03em; }
.conference-dialog-identity small { font-size:calc(10.5px * var(--avis-text, 1)); color:var(--muted); }
.conference-dialog-header .icon-button { background:none; color:#880303; }
.conference-dialog-header .icon-button:hover { color:#880303; }
.conference-dialog-header .icon-button.mi-button { width:auto; height:auto; padding:4px; border:0; background:transparent; }
.conference-dialog-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow-y:auto; background:#fff; }

/* AVI - the animated, voice-driven face of A.V.I.S AI - now lives entirely in the shared
   /avi/widget.css (src/avi-widget.mjs), included via <link> in index.html/admin.mjs/marketplace
   pages, instead of here. */
.conference-video-column { position:relative; flex:0 0 auto; display:flex; flex-direction:column; }
/* No background image is forced any more (see privateConferenceCamera in app.js, which blurs the
   real frame behind the recognised person until a slot below is chosen) - the gallery floats over
   the video, matching the guest call page's own gallery (conference.html, conference.js). Each
   slot is a wrapper div holding two sibling buttons (select, replace) rather than a nested
   button-in-button, which HTML forbids. */
.conference-video-background-controls { position:absolute; top:10px; right:10px; z-index:2; }
/* Reported directly: "The 6 video background images should be hidden in on[e] button" - the
   gallery is now a popover, opened by a single toggle button instead of always floating over
   the video. */
.conference-bg-toggle {
  -webkit-appearance:none; appearance:none; width:36px; height:36px;
  border:0; border-radius:0; background:none; color:#fff; box-sizing:border-box;
  font-size:calc(16px * var(--avis-text, 1)); line-height:1; cursor:pointer;
  box-shadow:none; filter:drop-shadow(0 1px 2px rgba(0,0,0,.65));
}
.conference-bg-toggle:hover { opacity:.8; }
.conference-bg-toggle[aria-expanded="true"] { color:#ffd9d9; }
.conference-bg-toggle[disabled] { opacity:.4; cursor:not-allowed; pointer-events:none; box-shadow:none; }
.conference-bg-gallery { position:absolute; top:calc(100% + 6px); right:0; padding:8px; border:1px solid #a60505; background:#fff; box-shadow:0 2px 4px rgba(0,0,0,.3), 0 6px 14px rgba(0,0,0,.2); display:grid; grid-template-columns:repeat(3, 36px); gap:6px; }
.conference-bg-gallery[hidden] { display:none; }
.conference-bg-slot { position:relative; width:36px; height:36px; }
.conference-bg-slot-select {
  -webkit-appearance:none; appearance:none; width:100%; height:100%;
  border:1px solid #a60505; border-radius:0; background:#fff no-repeat center/cover; color:#a60505; box-sizing:border-box;
  cursor:pointer; box-shadow:0 2px 4px rgba(0,0,0,.3), 0 6px 14px rgba(0,0,0,.2);
}
.conference-bg-slot-select::before { content:"+"; font:700 calc(16px * var(--avis-text, 1))/1 var(--font-ui); }
.conference-bg-slot.has-image .conference-bg-slot-select::before { content:""; }
.conference-bg-slot-select:hover { background-color:#fbebec; }
.conference-bg-slot-select[aria-pressed="true"] { border-color:#a60505; box-shadow:0 0 0 2px #a60505, 0 2px 4px rgba(0,0,0,.3); }
.conference-bg-slot-replace {
  -webkit-appearance:none; appearance:none; position:absolute; bottom:-4px; right:-4px; width:16px; height:16px;
  border:1px solid #a60505; border-radius:50%; background:#fff; color:#a60505; box-sizing:border-box;
  font:700 calc(9px * var(--avis-text, 1))/1 var(--font-ui); cursor:pointer; padding:0;
  box-shadow:0 1px 3px rgba(0,0,0,.3);
}
.conference-bg-slot-replace:hover { background:#fbebec; }
.conference-bg-slot-select[disabled],.conference-bg-slot-replace[disabled],.conference-bg-slot:has(input:disabled) .conference-bg-slot-select,.conference-bg-slot:has(input:disabled) .conference-bg-slot-replace { opacity:.4; cursor:not-allowed; pointer-events:none; box-shadow:none; }
/* Reported directly, after seeing the deployed result on an iPad: the buttons rendered as
   unstyled, glossy native pink controls instead of the intended white/red/shadow design.
   display:contents (used previously to merge two wrapper divs' buttons into one visual row) has
   long-standing WebKit bugs where a <button>/<a> inside a display:contents ancestor can lose
   its cascaded styling entirely and fall back to native chrome - exactly what the screenshot
   showed. Fixed at the root: every button is now a literal, direct child of one real grid
   container (no display:contents anywhere), and -webkit-appearance/appearance are reset
   explicitly below so no native control chrome can ever show through on any browser. */
.conference-room-row { flex:0 0 auto; display:flex; flex-direction:column; }
/* Reported directly: "compress and organise all the buttons into only 2 rows" - room code, date,
   invite title and the short link now sit inline in one compact row instead of stacked full-width
   blocks. Reported again: "The first raw is fully wide instead same width as the buttones... make
   the first raw same wide and quality as the buttones and exactly symmetric distances." Matches
   .conference-buttons-grid exactly: same 70% width, same centring, same 10px gap and 14px side
   padding, and the same real spacing (no more of the old edge-to-edge "frame on frame" adjacency
   that made the buttons look like a table before #248 - it had never been removed from this row). */
.conference-inputs-row { width:70%; margin:0 auto; padding:14px 14px 0; box-sizing:border-box; display:flex; flex-wrap:wrap; gap:10px; background:#fff; }
.conference-inputs-row input { flex:1 1 150px; margin:0; padding:11px 14px; box-sizing:border-box; border:1px solid #a60505; border-radius:0; background:#fff; color:#a60505; font:700 calc(11px * var(--avis-text, 1))/1 var(--font-ui); box-shadow:0 2px 4px rgba(0,0,0,.3), 0 6px 14px rgba(0,0,0,.2); }
.conference-inputs-row input::placeholder { color:#a60505; opacity:.62; }
/* The participant an invitation goes to, beside its date and title, in the same quality. */
.conference-inputs-row select { flex:1 1 150px; min-width:0; margin:0; padding:10px 12px; box-sizing:border-box; border:1px solid #a60505; border-radius:0; background:#fff; color:#a60505; font:700 calc(11px * var(--avis-text, 1))/1 var(--font-ui); box-shadow:0 2px 4px rgba(0,0,0,.3), 0 6px 14px rgba(0,0,0,.2); }
.conference-inputs-row select:focus { outline:none; box-shadow:0 0 0 2px rgba(166,5,5,.35), 0 2px 4px rgba(0,0,0,.3), 0 6px 14px rgba(0,0,0,.2); }
/* Reported directly: "by click comes an ugly frame out" - the browser's default blue focus
   ring/outline on the date-time field. Replaced with a focus style in the dialog's own palette. */
.conference-inputs-row input:focus { outline:none; border-color:#a60505; box-shadow:0 0 0 2px rgba(166,5,5,.35), 0 2px 4px rgba(0,0,0,.3), 0 6px 14px rgba(0,0,0,.2); }
@media(max-width:1024px),(hover:none) and (pointer:coarse) { .conference-inputs-row { width:100%; } }
.conference-participants { flex:0 0 auto; padding:10px 14px; display:flex; align-items:center; gap:8px; overflow-x:auto; border-top:1px solid var(--line); background:transparent; }
.conference-participants:empty { display:none; }
/* Reported directly, after a test call: "automatically all participants should have message", and "a
   futuristic tone plus selector". */
.conference-chat { padding:8px 14px 0; }
.conference-chat ol { max-height:140px; margin:0 0 6px; padding:0; overflow-y:auto; list-style:none; font-size:calc(12px * var(--avis-text, 1)); line-height:1.45; }
.conference-chat ol:empty { display:none; }
.conference-chat li { display:flex; gap:8px; padding:2px 0; }
.conference-chat li strong { flex:0 0 auto; color:var(--wine); }
.conference-chat li span { overflow-wrap:anywhere; }
.conference-chat form { display:flex; align-items:center; gap:8px; }
.conference-chat input { flex:1; min-width:0; }
.conference-tone { display:flex; align-items:center; gap:8px; padding:8px 14px; font-size:calc(12px * var(--avis-text, 1)); font-weight:700; }
.conference-tone label { display:flex; align-items:center; gap:8px; }
.conference-participant { flex:0 0 auto; display:flex; align-items:center; gap:7px; padding:5px 12px 5px 5px; border-radius:20px; background:var(--quiet); }
.conference-participant-avatar { width:24px; height:24px; border-radius:50%; background:#7f172a; display:grid; place-items:center; font-size:calc(9px * var(--avis-text, 1)); font-weight:700; color:#fff; flex:0 0 auto; }
.conference-participant span:last-child { font-size:calc(11px * var(--avis-text, 1)); color:var(--ink); white-space:nowrap; }
.conference-participant.is-connecting .conference-participant-avatar { background:#4d4548; }
.conference-participant.is-failed .conference-participant-avatar { background:#c0293f; }
.phone-display { min-height:42px; display:flex !important; align-items:center; justify-content:flex-end !important; padding:8px 11px; border:1px solid var(--line); border-radius:9px; font-variant-numeric:tabular-nums; }
.phone-keypad { display:grid !important; grid-template-columns:repeat(3,1fr); gap:7px !important; }
.phone-keypad button { min-height:38px; border:1px solid var(--line); border-radius:9px; background:#fff; }
/* Reported directly: "The video screen window must be a clean view with no frame video screen
   only" and "Make the screen and buttons all in white." Video: borderless/shadowless, on a white
   ground - matching the guest (weblink) call page's own frameless video, just re-themed light. */
/* Existing workspace behavior; unchanged by the AVISphare theme. */
.video-grid { flex:1; min-height:280px; width:100%; min-width:0; padding:16px; display:grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); grid-auto-rows:auto; align-content:center; gap: 0; background:#fff; overflow-y:auto; }
.video-grid video { display:block; width:100%; height:auto; max-width:100%; aspect-ratio:16/9; max-height:80dvh; object-fit:contain; border:0; border-radius:0; background:#f2eef0; box-shadow:none; }
.video-grid video[data-auto-muted] { cursor:pointer; }
.video-grid.fill-video video { object-fit:cover; }
/* Existing workspace behavior; unchanged by the AVISphare theme. */
/* Reported directly: "Invitation Code.... means no code sending" - the link buttons (Create invitation, Copy link, Message,
   Team message, Signal, Add to calendar) are gone; the call's own buttons and the invitation's three ways (AVIS message,
   WhatsApp, Email) make ten, still one block of exactly 2 rows. */
.conference-buttons-grid { width:70%; margin:0 auto; padding:14px; display:grid; grid-template-columns:repeat(5,1fr); grid-template-rows:repeat(2,1fr); gap:10px; background:#fff; }
/* Existing workspace behavior; unchanged by the AVISphare theme. */
.conference-tool {
  -webkit-appearance:none; appearance:none;
  padding:14px 10px 12px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px;
  border:1px solid #a60505; border-radius:0; background:#fff; color:#a60505; box-sizing:border-box;
  font:700 calc(10px * var(--avis-text, 1))/1.15 var(--font-ui); letter-spacing:.02em;
  text-decoration:none; text-align:center; cursor:pointer; position:relative; z-index:1;
  box-shadow:0 2px 4px rgba(0,0,0,.3), 0 6px 14px rgba(0,0,0,.2);
  transition:background .12s ease,color .12s ease,box-shadow .12s ease,transform .06s ease;
}
.conference-tool:hover:not(:disabled) { background:#fbebec; box-shadow:0 3px 6px rgba(0,0,0,.35), 0 8px 18px rgba(0,0,0,.25); transform:translateY(-1px); z-index:2; }
.conference-tool:disabled, .conference-tool.disabled { opacity:.4; cursor:not-allowed; pointer-events:none; box-shadow:none; }
.conference-tool-icon { width:20px; height:20px; stroke-width:1.8; }
/* Reported directly, with the design uploaded (07 IconMessage): the camera is the design's own, at the tool's size. */
.conference-tool .mi-camera { width:26px; height:20.3px; }
.conference-tool-icon.conference-tool-icon-off { display:none; }
.conference-tool[aria-pressed="false"] .conference-tool-icon:not(.conference-tool-icon-off) { display:none; }
.conference-tool[aria-pressed="false"] .conference-tool-icon-off { display:block; }
.conference-tool[aria-pressed="false"]:not(.conference-tool-leave) { background:#a60505; border-color:#a60505; color:#fff; }
.conference-tool-icon-record { fill:currentColor; stroke:none; }
.conference-tool.recording .conference-tool-icon-record:not(.conference-tool-icon-off) { display:none; }
.conference-tool.recording .conference-tool-icon-record.conference-tool-icon-off { display:block; }
.conference-tool.recording { background:#a60505; border-color:#a60505; color:#fff; }
/* Reported directly: "The text change to dark green colour (same as video button) ones pressed" -
   the exact rgb(35,97,99) the letter composer's own video icon already turns on press
   (.letter-postoffice-action:active span{color:rgb(35,97,99)}), applied the same way here: only
   the text/border recolour, the white ground stays white, so a press never becomes a solid dark
   block - matching that existing button's behaviour precisely. Placed after the aria-pressed/
   recording rules so a live press always wins over whatever a toggle's resting tint would
   otherwise show. The inset shadow and 1px downward shift read as physically depressing, distinct
   from the hover-only lift above. */
.conference-tool:active:not(:disabled) {
  color:rgb(35,97,99); border-color:rgb(35,97,99); background:#fff;
  box-shadow:inset 0 2px 4px rgba(0,0,0,.4); transform:translateY(1px); z-index:2;
}
@media(max-width:1024px),(hover:none) and (pointer:coarse) { .conference-buttons-grid { width:100%; } }
@media(max-width:560px) { .conference-buttons-grid { grid-template-columns:repeat(2,1fr); grid-template-rows:repeat(5,1fr); } }
.finance-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.finance-hero h1 { margin: 4px 0 7px; color: var(--wine-deep); font-size: clamp(calc(27px * var(--avis-text, 1)), calc(4vw * var(--avis-text, 1)), calc(43px * var(--avis-text, 1))); letter-spacing: -.035em; }
.finance-hero p:last-child { margin: 0; color: var(--muted); }
.finance-status { padding: 7px 11px; border: 1px solid rgba(127,23,42,.25); border-radius: 30px; background: rgba(255,255,255,.8); color: var(--wine); font-size: calc(10px * var(--avis-text, 1)); font-weight: 700; }
/* Reported directly: "The back office works via my AVISphare leaf accessible in a free floating window". */
/* Reported directly: "the suite must be absolute impressive luxury on its free floating popup window", then "The card
   composer is sitting on a helper window and has 2 headers. Remove the helper window for be only one window": the window
   is Art of Card alone, white with a black shadow; its own header (AVIS ART OF CARD, ⤢ and ×) is the only one. */
.card-window { padding: 0; border: 0; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.card-window[open] { display: flex; flex-direction: column; }
.card-window-body { flex: 1; min-height: 0; background: #fff; }
.card-window-body iframe { display: block; width: 100%; height: 100%; border: 0; }
body.chat-floating :is(#chatHead,.chat-list-head) { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
body.embed-messages.chat-floating .chat-head { padding-left: 28px; }
.bank-window { padding: 0; border: 0; border-radius: 14px; background: #fff; overflow: hidden; }
.bank-window[open] { display: flex; flex-direction: column; }
.bank-window-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bank-window-head strong { font-size: calc(13px * var(--avis-text, 1)); letter-spacing: .12em; text-transform: uppercase; }
/* Reported directly: "Mount the AVIS favicon into the bank server" - the bank window's bar carries the AVIS favicon, as the
   office's windows do (room-windows.mjs). */
/* Reported directly, of a free floating window: "only remove the title bar text, the name of the window opened and the leaf of a free floating window. Do not remove content of a widnow": no leaf and no name in the bank window's bar - its name kept for screen readers (aria-labelledby). */
.bank-window-head > strong { margin-right: auto; font-size: 0; }
.bank-window-body { flex: 1; min-height: 0; }
.bank-window-body iframe { display: block; width: 100%; height: 100%; border: 0; }
/* Reported directly: "mount a page loading spinner" - the AVIS spinner over a window until its page is there
   (src/window-loading.mjs, .avis-loading). */
.card-window-body, .bank-window-body { position: relative; }
/* Reported directly: "What i want is that someone that open the APP in his phone gets directly the full screen messenger
   and with icons press he can get to the landing and AVISphare". The app starting on a phone (embed-bootstrap.js): nothing
   of the AVISphere shows until Messages fills the screen - the AVIS spinner on white meanwhile (app.js appStarted). */
html.app-starting-phone { background: #fff; }
html.app-starting-phone body { visibility: hidden; }
html.app-starting-phone::before, html.app-starting-phone::after { position: fixed; }
body.embed-messages.avis-loading .app-shell { visibility: hidden; }
.land-window { width: min(1440px, calc(100vw - 16px)); height: min(900px, calc(100dvh - 16px)); }
.corporate-block { margin-top: 20px; }
.corporate-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.corporate-heading h2 { margin: 3px 0 0; color: var(--wine-deep); }
.corporate-heading > span { color: var(--muted); font-size: calc(10px * var(--avis-text, 1)); }
.corporate-previews { margin-top: 13px; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.corporate-previews article { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 8px 24px rgba(49,20,28,.08); }
.corporate-previews iframe { width: 100%; height: 210px; border: 0; background: #eee9ea; pointer-events: none; }
.corporate-previews a { padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; color: var(--wine); text-decoration: none; }
.corporate-previews a span { color: var(--muted); font-size: calc(9px * var(--avis-text, 1)); }
.file-preview-dialog { width: min(940px, calc(100vw - 30px)); height: min(820px, calc(100dvh - 30px)); padding: 0; border: 1px solid rgba(127,23,42,.3); border-radius: 14px; }
.file-preview-dialog::backdrop { background: transparent; backdrop-filter:none; }
.file-preview-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.file-preview-shell header, .file-preview-shell footer { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.file-preview-shell iframe { width: 100%; height: 100%; border: 0; background: #f5f3f3; }
.file-preview-shell footer { justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); border-bottom: 0; }
.file-preview-shell .send-button { text-decoration: none; }

.placeholder-view { display: grid; place-items: center; padding: 30px; }
.placeholder-card { max-width: 430px; padding: 42px; border: 1px solid rgba(127,23,42,.28); border-radius: 14px; box-shadow: var(--shadow); text-align: center; }
.placeholder-icon { width: 52px; height: 52px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 12px; background: var(--wine-soft); color: var(--wine); }
.placeholder-card p:last-of-type { color: var(--muted); font-size: calc(13px * var(--avis-text, 1)); line-height: 1.55; }
.placeholder-card button { margin-top: 13px; padding: 10px 15px; border: 1px solid var(--wine); border-radius: 8px; background: white; color: var(--wine); font-size: calc(12px * var(--avis-text, 1)); font-weight: 650; }

/* Reported directly: forwarding (or replying to) an open message "goes on a static blur window
   instead of a free floating window". The compose dialog is a non-modal .show() window like the
   Letter Creator and Contact Incubator, which both sit at z-index:95 - but this was left at the
   z-index the page uses for ordinary in-flow content (30), well below the open message reader's
   own floating panel (z-index:80) and its dimming backdrop (z-index:79). Replying or forwarding
   from an open message left the compose window stacked entirely behind that backdrop: fixed in
   place beneath the blur, impossible to reach, not the floating window it is everywhere else. */
.compose-dialog { position:fixed; z-index:95; inset:0; width:min(1080px,calc(100vw - 32px)); min-width:min(760px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); margin:auto; padding:0; overflow:hidden; border:1px solid rgba(127,23,42,.36); border-radius:14px; background:white; box-shadow:0 30px 90px rgba(43,16,22,.24); }
.compose-dialog.compose-dialog-moved { inset:auto; margin:0; }
.compose-dialog::backdrop { background: transparent; backdrop-filter:none; }
.compose-shell > header { height:62px; padding:0 15px 0 20px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); cursor:move; touch-action:none; user-select:none; }
.compose-shell > header :is(button,input,a) { cursor:pointer; }
.compose-shell > header > div { display: flex; align-items: center; gap: 10px; }
.compose-shell > header > div > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.compose-shell > header strong { font-size: calc(13px * var(--avis-text, 1)); }
.compose-shell > header small { color: var(--muted); font-size: calc(10px * var(--avis-text, 1)); }
/* Reported directly: "if there is a second mailbox assigned for the user then at the header must be
   a selector through what mail should be sended the email out" - composePayload() already sends as
   state.profile (app.js), so this sits right where #composeMailbox's plain-text address used to be,
   swapped in only once there's more than one mailbox to choose from (renderMailbox() toggles which
   of the two is shown/hidden; a single-mailbox user never sees a selector with nothing to select). */
.compose-mailbox-select { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: calc(10px * var(--avis-text, 1)); padding: 0; margin: 0; cursor: pointer; }
.compose-mailbox-select:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
/* Reported directly: "Add the messenger icon to come out of the email composer" - beside the composer's own icons. */
.compose-messages { margin-left: auto; color: var(--wine); }
.compose-messages svg { width: 21px; height: 21px; }
/* Reported directly, with Mail's own bar on an iPad as the picture: "Email header what is not in the right klick is that
   what I have uploaded and not convert in pills button" - the header's icons alone, thin lines each in a ring, like the
   picture's; then "Remove the black icon and clear the header there is mixed up". */
.compose-shell > header .icon-button { width: 36px; height: 36px; border: 1.5px solid #1d1d1f; border-radius: 50%; background: #fff; color: #1d1d1f; }
.compose-shell > header .icon-button + .icon-button { margin-left: 10px; }
.compose-shell > header .icon-button:hover { color: #1d1d1f; background: #f5f5f7; }
.compose-shell > header .icon-button svg { width: 18px; height: 18px; stroke-width: 1.6; }
/* Then: "In the email composer the only stays in the header is the sending out button and the address and reference fields
   all other functionalities are in the right click" - the sender's address, Send as Mail's ↑, and the window's own ×; its
   foot keeps only what it says while sending or on a mistake. */
.compose-shell > header .compose-send { margin-left: auto; }
.compose-shell > header .icon-button:disabled { opacity: .4; cursor: default; }
.compose-footer:has(> .compose-notice:empty):not(:has(> div:not(.compose-notice))) { display: none; }
.compose-grid { display: grid; grid-template-columns: minmax(0, 1fr) 285px; min-height: min(690px, calc(100dvh - 106px)); }
.compose-fields { min-width: 0; display: grid; grid-template-rows: repeat(4, auto) minmax(240px, 1fr) auto; padding: 10px 23px 17px; }
/* Reported directly: "make the email writing rows 30% less night without change the size of the text" - To, Cc, Bcc and
   Subject 33px high instead of 47 (here, .compose-recipient-field and .recipient-entry below), their letters as they were. */
.compose-fields > label { min-height: 33px; display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); }
.compose-fields > label > span { color: #817a7c; font-size: calc(11px * var(--avis-text, 1)); }
.compose-fields input { min-width: 0; border: 0; outline: 0; color: var(--ink); font-size: calc(13px * var(--avis-text, 1)); }
.bcc-toggle { padding: 4px; border: 0; background: transparent; color: var(--wine); font-size: calc(10px * var(--avis-text, 1)); }
.rich-compose { min-height: 290px; display: grid; grid-template-rows: auto minmax(230px,1fr); }
.compose-toolbar { padding: 7px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; border-bottom: 1px solid var(--line); }
.compose-toolbar select, .compose-toolbar button { min-height: 30px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: calc(10px * var(--avis-text, 1)); }
.compose-toolbar select { max-width: 125px; }
.compose-toolbar input[type="color"] { width: 32px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.compose-toolbar button:hover { border-color: var(--wine); color: var(--wine); }
.compose-document { min-height: 230px; overflow-y: auto; }
.compose-body { min-height: 40px; padding: 19px 0; outline: 0; color: #332f30; font-size: calc(14px * var(--avis-text, 1)); line-height: 1.58; display: flow-root; }
.compose-body:empty::before { content: attr(data-placeholder); color: #999194; pointer-events: none; }
/* Reported directly: "remove this shown up row for a standard signature that is not normal" - a click into the signature
   drew the browser's frame round it, a box under the text; the message above it never had one (outline: 0). */
.compose-signature { width: 100%; padding: 14px 0 0; overflow-x: auto; background: #fff; white-space: normal; outline: 0; }
.compose-signature table { max-width: none !important; }
/* Reported directly: a forwarded email "loos its formatting and shrinks into a simply text
   instead keeps all the historical formatting" - the quoted content below is now real HTML (see
   setComposeForwarded in app.js), not a single pre-wrapped plain-text block, so white-space:
   pre-wrap is dropped in favour of letting its own <p>/<br> elements set line breaks. */
/* Reported directly: "the received email is embedded in a transparent window that must be removed. No helper windows
   needed" - the browser's own focus frame was drawn round the quoted message; it is part of the email, like the text and
   the signature above it, which have none. */
.compose-forwarded { margin-top:18px; padding:14px 0 0; border-top:1px solid var(--line); color:#5d5659; font-size:calc(11px * var(--avis-text, 1)); line-height:1.45; overflow-wrap:anywhere; outline:0; }
.compose-forwarded > p { margin:0 0 4px; }
.compose-forwarded-body { margin-top:10px; }
.compose-forwarded-body img { max-width:100%; height:auto; }
.compose-forwarded-body table { max-width:100%; }
.compose-inline-files { min-height:34px; margin-top:3mm; padding:0 0 4px; display:flex; align-items:flex-start; flex-wrap:wrap; gap:7px; border-top:0; }
.compose-document.is-file-drop { background:#fff9fa; }
#composeAttachmentList, #teamMessageAttachmentList { display: flex; flex-wrap: wrap; gap: 6px; }
.compose-attachment-card { position:relative; width:102px; padding:0; display:flex; flex-direction:column; align-items:stretch; gap:3px; border:0; border-radius:0; background:transparent; color:var(--ink); font-size:calc(7px * var(--avis-text, 1)); }
.compose-attachment-card > strong { position:relative; width:102px; height:102px; display:grid; place-items:center; border:0; border-radius:0; background:#777; color:#fff; font-size:calc(8px * var(--avis-text, 1)); }
.compose-attachment-card > strong[role="button"] { cursor:pointer; }
.compose-attachment-card > strong.pdf { background:#b42332; }
.compose-attachment-card > strong img,.compose-attachment-card > strong video { width:100%; height:100%; border:0; border-radius:0; object-fit: contain; background:transparent; }
.compose-attachment-card > span { display:block; width:102px; font-size:calc(7px * var(--avis-text, 1)); line-height:1.2; overflow-wrap:anywhere; }
.compose-attachment-play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#fff; font-size:calc(16px * var(--avis-text, 1)); text-shadow:0 1px 3px rgba(0,0,0,.7); pointer-events:none; }
.compose-attachment-remove { position:absolute; top:-6px; right:-6px; width:18px; height:18px; padding:0; display:grid; place-items:center; border:1px solid #e7dfe2; border-radius:50%; background:#fff; color:#5d5257; font-size:calc(13px * var(--avis-text, 1)); line-height:1; cursor:pointer; z-index:1; }
.compose-attachment-remove:hover { border-color:#b42332; background:#fbeaec; color:#b42332; }
.compose-attachment-insert { width:102px; padding:2px 0; border:1px solid #e7dfe2; border-radius:3px; background:#fff; color:var(--ink); font-size:calc(7px * var(--avis-text, 1)); cursor:pointer; }
.compose-attachment-insert:hover { border-color:#7f172a; background:#fff9fa; color:#7f172a; }
.compose-inline-image { position:relative; display:block; width:fit-content; max-width:100%; line-height:0; }
.compose-inline-image > img { display:block; max-width:100%; width:auto; height:auto; float:none !important; clear:none !important; margin:0 !important; }
.compose-inline-image-resize { position:absolute; right:0; bottom:0; width:20px; height:20px; cursor:nwse-resize; touch-action:none; }
.compose-inline-image:focus { outline:0; }
@media (pointer:coarse) { .compose-inline-image-resize { width:32px; height:32px; } }
.compose-footer { padding-top: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px 15px; border-top: 1px solid var(--line); }
.compose-encrypted-toggle { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: calc(10px * var(--avis-text, 1)); margin-bottom: 4px; }
.compose-encrypted-toggle input { accent-color: var(--wine); }
.compose-footer > div { display: flex; gap: 7px; }
.secondary-button, .send-button { height: 37px; padding: 0 14px; border-radius: 8px; font-size: calc(11px * var(--avis-text, 1)); font-weight: 650; }
.secondary-button { border: 1px solid var(--line); background: white; color: #6d6668; }
.send-button { display: flex; align-items: center; gap: 7px; border: 1px solid var(--wine); background: var(--wine); color: white; }
.send-button:disabled { opacity: .6; cursor: wait; }
.send-button svg { width: 15px; height: 15px; }
.compose-avis { padding: 28px 22px; border-left: 1px solid rgba(127,23,42,.19); background: #fdf9fa; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.quick-actions button { padding: 5px 8px; border: 1px solid rgba(127,23,42,.2); border-radius: 6px; background: white; color: var(--wine); font-size: calc(9px * var(--avis-text, 1)); }
.compose-avis textarea { margin-top: 14px; display: block; width: 100%; padding: 10px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: white; color: var(--ink); font-size: calc(11px * var(--avis-text, 1)); line-height: 1.45; }
.compose-avis textarea:focus { border-color: rgba(127,23,42,.4); }
.ai-generate { width: 100%; height: 38px; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--wine); border-radius: 8px; background: white; color: var(--wine); font-size: calc(11px * var(--avis-text, 1)); font-weight: 650; }
.ai-generate:disabled { opacity: .6; cursor: wait; }
.voice-button { width: 100%; min-height: 35px; margin-top: 8px; border: 1px solid rgba(127,23,42,.24); border-radius: 8px; background: #fff; color: var(--wine); font-size: calc(11px * var(--avis-text, 1)); font-weight: 650; }
.ai-ask { display: flex; gap: 6px; margin-top: 10px; }
.ai-ask .ai-generate { margin: 0; }
.ai-ask .voice-button { width: auto; min-width: 42px; min-height: 38px; margin: 0; padding: 0 10px; white-space: nowrap; font-size: calc(15px * var(--avis-text, 1)); }
.compose-notice:empty { display: none; }
.compose-ai-activity { margin-top: 10px; padding: 9px; border-radius: 7px; background: #f2edef; color: #625a5d; font-size: calc(10px * var(--avis-text, 1)); line-height: 1.45; overflow-wrap: anywhere; }
.compose-ai-activity.working { border-left: 3px solid #9b7a31; }
.compose-ai-activity.complete { border-left: 3px solid #278052; }
.compose-ai-activity.error { border-left: 3px solid #b42332; color: #8d182b; }
.preview-dialog { width: min(900px, calc(100vw - 32px)); height: min(820px, calc(100dvh - 32px)); padding: 0; border: 1px solid rgba(127,23,42,.3); border-radius: 15px; background: #fff; box-shadow: 0 30px 90px rgba(43,16,22,.3); }
.preview-dialog::backdrop { background: transparent; backdrop-filter:none; }
.preview-shell { height: 100%; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto auto; }
.preview-shell header, .preview-shell footer { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.preview-shell header > div { display: flex; flex-direction: column; gap: 3px; }
.preview-shell header small, .preview-shell footer span { color: var(--muted); font-size: calc(11px * var(--avis-text, 1)); }
#composePreviewFrame { width: 100%; height: 100%; border: 0; background: #fff; }
.preview-envelope { margin: 0; padding: 11px 18px; display: grid; grid-template-columns: 55px minmax(0,1fr); gap: 4px 10px; border-bottom: 1px solid var(--line); font-size: calc(11px * var(--avis-text, 1)); }
.preview-envelope dt { color: var(--muted); }
.preview-envelope dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); }
.preview-attachments { padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--line); }
.preview-shell footer { border-top: 1px solid var(--line); border-bottom: 0; }
.compose-avis > small { margin-top: 10px; display: block; color: #9b9396; font-size: calc(9px * var(--avis-text, 1)); line-height: 1.4; text-align: center; }



.security-view { height:100%; overflow:auto; padding:clamp(24px,4vw,58px); background:#fff; }
.security-heading { max-width:980px; margin:0 auto 28px; padding-bottom:22px; display:flex; align-items:flex-end; justify-content:space-between; gap:24px; border-bottom:1px solid var(--line); }
.security-heading h1 { margin:4px 0 6px; color:var(--wine-deep); font-size:clamp(calc(25px * var(--avis-text, 1)),calc(3vw * var(--avis-text, 1)),calc(36px * var(--avis-text, 1))); font-weight:650; letter-spacing:0; }
.security-heading > div > p:last-child { margin:0; color:var(--muted); font-size:calc(13px * var(--avis-text, 1)); }
.mail-accounts-heading { margin-top:44px; }
.security-state { display:flex; align-items:center; gap:7px; color:#246743; font-size:calc(12px * var(--avis-text, 1)); font-weight:650; white-space:nowrap; }
.security-state svg { width:18px; height:18px; }
.security-methods { max-width:980px; margin:0 auto; display:grid; gap:14px; }
.security-method { padding:24px; display:grid; grid-template-columns:44px minmax(0,1fr); gap:18px; border:1px solid rgba(127,23,42,.22); border-radius:0; background:#fff; box-shadow:0 12px 30px rgba(0,0,0,.08); }
.security-method-icon { width:44px; height:44px; display:grid; place-items:center; border:1px solid rgba(127,23,42,.35); color:var(--wine); }
.security-method-copy h2 { margin:3px 0 7px; color:var(--ink); font-size:calc(19px * var(--avis-text, 1)); letter-spacing:0; }
.security-method-copy h2 a { color:inherit; text-decoration:none; }
/* Tools · Text size (text-size.mjs): A-, the size (pressed, back to 100%), A+. */
.text-size-block { margin-bottom:44px; }
.text-size-icon { font-size:calc(17px * var(--avis-text, 1)); font-weight:700; }
.text-size-tool { margin-top:12px; display:flex; align-items:center; gap:10px; }
.text-size-tool .secondary-button { min-width:52px; height:40px; color:var(--wine); font-size:calc(16px * var(--avis-text, 1)); font-weight:700; }
.text-size-tool .secondary-button:disabled { opacity:.4; cursor:default; }
.text-size-value { min-width:64px; height:40px; border:0; background:transparent; color:var(--ink); font-size:calc(15px * var(--avis-text, 1)); font-weight:650; cursor:pointer; }
.account-delete-form { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.account-delete-form input { flex:1 1 200px; max-width:320px; padding:9px 11px; border:1px solid #9b1c20; border-radius:8px; font:inherit; }
.security-method-copy > p:not(.eyebrow):not(.security-support) { max-width:720px; margin:0 0 16px; color:var(--muted); font-size:calc(12px * var(--avis-text, 1)); line-height:1.55; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 360px; padding: 12px 15px; border: 1px solid rgba(127,23,42,.28); border-radius: 9px; background: white; box-shadow: 0 16px 38px rgba(50,20,27,.18); color: #4d4648; font-size: calc(12px * var(--avis-text, 1)); animation: toast-in .2s ease; pointer-events: auto; }
.toast.error { border-color: #bc354b; color: #831329; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.mobile-scrim { display: none; }

@media (max-width: 1180px) {
  :root { --sidebar: 226px; --rail: 74px; }
  .brand-copy small, .tool-button span { display: none; }
  .brand { width: calc(var(--rail) + var(--sidebar) - 18px); }
  .sector-grid { grid-template-columns: repeat(3, minmax(135px, 1fr)); }
}

/* Below the floating-dialog breakpoint used across the app (see .letter-creator-dialog),
   the floating tools panel and call window fall back to plain stacked/full-screen layout. */
@media (max-width: 1024px) {
  .connect-tools { position:static; width:100%; max-height:none; margin-top:18px; box-shadow:0 8px 24px rgba(52,27,33,.08); }
  .connect-tools-head { cursor:default; }
  .connect-tools-body { flex-direction:column; }
  .conference-dialog { width:min(640px,94vw); height:min(560px,88dvh); }
}

@media (max-width: 900px) {
  .security-heading { align-items:flex-start; flex-direction:column; }
  .security-method { grid-template-columns:1fr; }
  :root { --topbar: 66px; --rail: 64px; }
  body { padding-bottom: calc(var(--rail) + env(safe-area-inset-bottom)); }
  .app-shell { height: calc(100dvh - var(--rail) - env(safe-area-inset-bottom)); grid-template: var(--topbar) minmax(0, 1fr) / minmax(0, 1fr); }
  .topbar { grid-column: 1; padding: 0 13px; }
  .mobile-menu { display: grid; }
  .brand { width: auto; flex: 0 1 auto; }
  .brand-copy { display: none; }
  .global-search { margin-left: 12px; }
  .global-search kbd, .avis-trigger { display: none; }
  .top-actions { padding-left: 9px; }
  .top-actions > .icon-button { display: none; }
  .avatar { width: 36px; height: 36px; }
  .app-rail { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--rail) + env(safe-area-inset-bottom)); padding: 6px max(7px, env(safe-area-inset-left)) env(safe-area-inset-bottom); flex-direction: row; justify-content: space-around; border: 0; border-top: 1px solid var(--line); background: rgba(255,255,255,.98); }
  .rail-item { flex: 1; min-height: 50px; max-width: 100px; }
  .rail-item img { width:38px; height:38px; }
  .rail-end { display:flex; margin-top:0; }
  .mail-nav { position: fixed; top: var(--topbar); bottom: calc(var(--rail) + env(safe-area-inset-bottom)); left: 0; width: min(300px, 84vw); padding: 19px 16px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 18px 0 50px rgba(39,19,24,.15); }
  .app-shell.nav-open .mail-nav { transform: translateX(0); }
  .mobile-scrim { position: fixed; inset: var(--topbar) 0 calc(var(--rail) + env(safe-area-inset-bottom)) 0; z-index: 18; background: rgba(33,25,28,.32); }
  .app-shell.nav-open + .mobile-scrim, .app-shell.nav-open ~ .mobile-scrim { display: block; }
  .main-surface { grid-column: 1; grid-row: 2; }
  .app-shell.landing-active { height:calc(100dvh - var(--rail) - env(safe-area-inset-bottom)); grid-template-rows:var(--topbar) auto minmax(0,1fr); }
  .mail-workspace { grid-template-columns: minmax(290px, 42%) minmax(0, 1fr); }
  .reader-content { padding-inline: 24px; }
  .reader-tools { gap: 0; }
  .tool-button { padding: 0 7px; }
  .sector-layout { grid-template-columns: 1fr; }
  .sector-detail { position: static; }
  .sector-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 700px) {
  .global-search { flex-basis: auto; height: 39px; }
  .global-search input::placeholder { color: transparent; }
  .corporate-landing { padding:18px 0 0; background:#fff; }
  .last-stores { margin:0 16px 4px; }
  .app-shell.landing-active .mail-workspace { height:max(520px,calc(100dvh - var(--rail))); min-height:520px; }
  .mail-workspace { display: block; }
  .message-list-panel, .reader-panel { height: 100%; }
  .reader-panel { display: none; }
  .mail-workspace.message-open .message-list-panel { display: none; }
  .mail-workspace.message-open .reader-panel { display: block; }
  .reader-back { display: grid; }
  .reader-toolbar { padding: 0 10px; gap: 5px; }
  .reader-tools { flex: 1; justify-content: center; }
  .tool-button { width: 35px; justify-content: center; }
  .tool-button span { display: none; }
  .reader-content { padding: 23px 17px 50px; }
  .reader-heading { display: block; }
  .reader-heading time { display: block; padding-top: 8px; }
  .recipient-details, .attachment-list, .thread-strip { margin-left: 0; }
  .message-frame { min-height: 120px; }
  .hub-view { padding: 24px 16px 38px; }
  .hub-header { align-items: flex-start; flex-direction: column; }
  .sector-layout { margin-top: 24px; }
  .sector-grid { grid-template-columns: repeat(2, minmax(125px, 1fr)); gap: 10px; }
  .sector-tile { min-height: 128px; padding: 14px; }
  .sector-tile strong { margin-top: 14px; }
  .avis-view { padding: 28px 15px; align-items: start; }
  .avis-orbit { width: 72px; height: 72px; margin-bottom: 18px; }
  .avis-stage h1 { font-size: calc(42px * var(--avis-text, 1)); }
  .avis-expansion { font-size: calc(11px * var(--avis-text, 1)); }
  .avis-intro { font-size: calc(13px * var(--avis-text, 1)); }
  .avis-command > div { align-items: flex-end; }
  .avis-command > div span { max-width: 170px; }
  .compose-dialog { width: 100vw; max-width: none; max-height: 100dvh; height: 100dvh; border: 0; border-radius: 0; }
  .compose-shell { height: 100%; display: grid; grid-template-rows: 62px minmax(0, 1fr); }
  .compose-grid { min-height: 0; grid-template-columns: 1fr; overflow-y: auto; }
  .compose-fields { min-height: 620px; padding-inline: 16px; }
  .compose-footer { align-items: flex-start; flex-direction: column; }
  .compose-footer > div { width: 100%; }
  .compose-footer button { flex: 1; justify-content: center; }
  .compose-avis { border: 0; border-top: 1px solid rgba(127,23,42,.19); }
  .documents-view { padding: 20px 14px; }
  .document-card { grid-template-columns: 58px minmax(0,1fr); }
  .document-card img { width: 58px; height: 58px; }
  .repository-badge { grid-column: 2; justify-self: start; }
  .document-fields { grid-template-columns: 1fr; }
  .finance-view { padding: 22px 14px; }
  .connect-view { padding: 22px 14px; }
  .connect-header { align-items: flex-start; flex-direction: column; }
  .team-chat { height:auto; min-height:0; }
  .private-message-target { align-items:stretch; flex-direction:column; }
  .team-message-list { flex:none; max-height:min(20cm,50dvh); padding:12px; }
  .conference-dialog-header { align-items:flex-start; flex-direction:column; gap:4px; height:auto; padding:10px 14px; }
  .team-message-list article { width: 88%; }
  /* Reported directly: "Mobile should be 2 video screen nebst each other not as a column" -
     two tiles side by side instead of stacked, even at phone width. */
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .finance-hero, .corporate-heading { align-items: flex-start; flex-direction: column; }
  .corporate-previews { grid-template-columns: 1fr; }
  .corporate-previews iframe { height: 180px; }
  .toast-region { right: 12px; bottom: calc(var(--rail) + 12px); left: 12px; }
  .toast { max-width: none; }
}

@media (max-width: 390px) {
  .topbar { padding-inline: 9px; }
  .mobile-menu { margin-right: 6px; }
  .global-search { margin-left: 6px; }
  .message-card { min-height: 108px; }
  .sector-grid { grid-template-columns: 1fr 1fr; }
  .sector-tile { min-width: 0; }
  .sector-tile strong { font-size: calc(11px * var(--avis-text, 1)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* Bounded modal with a persistent action footer and independently scrollable content. */
.compose-dialog { height: min(900px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); }
.compose-shell { height: 100%; min-height: 0; display: grid; grid-template-rows: 62px minmax(0,1fr) auto; overflow: hidden; }
.compose-grid { min-height: 0; overflow: hidden; }
.compose-fields { display: block; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 20px; }
.rich-compose { display: block; min-height: 0; }
.compose-document { min-height: 210px; overflow: visible; }
.compose-body { min-height: 40px; white-space: pre-wrap; overflow-wrap: anywhere; }
.compose-body p { margin: 0 0 1em; }
.compose-avis { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.compose-footer { position:relative; z-index:1; min-height:0; padding: 10px 20px max(10px, env(safe-area-inset-bottom)); background: white; max-height: 38dvh; overflow-y: auto; }
.compose-footer > div { flex-wrap: wrap; }
.compose-inline-files { max-height: 160px; overflow-y: auto; }
@media (max-width: 760px) {
 .compose-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
 .compose-shell { grid-template-rows: 56px minmax(0,1fr) auto; }
 .compose-shell > header { height: 56px; }
 .compose-grid { display: block; overflow-y: auto; }
 .compose-fields, .compose-avis { overflow: visible; min-height: 0; }
 .compose-fields { padding-inline: 12px; }
 .compose-avis { padding: 18px 12px; }
 .compose-footer { padding: 8px 12px max(8px, env(safe-area-inset-bottom)); grid-template-columns: 1fr; gap: 6px; }
 .compose-footer > div { gap: 5px; }
 .compose-footer button { padding-inline: 9px; }
}
/* Then, with the writer on a phone in the app as the picture, its header under the phone's own line: "Never glue into the
   corners handling details as this is in mobile and all devised always fro system used" - its window starts below that
   line (body.embed-desktop-window below), and its header keeps clear of the screen's sides. */
.compose-shell > header { padding-right: max(15px, env(safe-area-inset-right, 0px)); padding-left: max(20px, env(safe-area-inset-left, 0px)); }
/* Reported directly, with the writer on a phone in the app: "In mobiles the mail handling is blocked into the device headers
   move it 5mm down". On a phone the AVISphere's own writer fills the screen from its very top (max-width:900px below), where
   the phone's header - its clock, island and battery - lies over the page: its bar starts 5 mm lower there (30 points, a
   phone's screen holding about 6 to a millimetre), never more than that header is high, and as before wherever nothing lies
   over the page. A window of its own already starts below that header (body.embed-desktop-window). */
@media (max-width: 900px) {
 body:not(.embed-desktop-window) .compose-shell { --writer-drop: min(30px, var(--safe-top)); grid-template-rows: calc(62px + var(--writer-drop)) minmax(0,1fr) auto; }
 body:not(.embed-desktop-window) .compose-shell > header { height: calc(62px + var(--writer-drop)); padding-top: var(--writer-drop); }
}
@media (max-width: 760px) {
 body:not(.embed-desktop-window) .compose-shell { grid-template-rows: calc(56px + var(--writer-drop)) minmax(0,1fr) auto; }
 body:not(.embed-desktop-window) .compose-shell > header { height: calc(56px + var(--writer-drop)); }
}

.compose-notice { grid-column:1/-1; font-size:calc(12px * var(--avis-text, 1)); color:#526059; overflow-wrap:anywhere; }
.compose-notice.error { color:#a01530; font-weight:600; }
.compose-recipient-field{position:relative;min-height:33px}
.recipient-entry{min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:5px;padding:2px 0}
.recipient-entry>input{flex:1 1 150px;min-height:28px}
.recipient-chips{display:flex;align-items:center;flex-wrap:wrap;gap:4px}
/* Reported directly: "remove the behaviour that a email address after typing gets a pill button that must remain a simple
   text that gets fixed after typed" - an address typed stays its words, as large as what is typed beside it ("the email
   fields typing text and the subject typing text must be 30% smaller": 16px, as they took it from the window, to 11.2px);
   chosen, to be deleted, it is marked as words are. */
.recipient-chip{max-width:290px;padding:0;border:0;border-radius:2px;background:none;box-shadow:none;color:var(--ink);font:400 calc(11.2px * var(--avis-text, 1))/1.4 var(--font-ui);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:text}
.recipient-chip::after{content:";"}
.recipient-chip[aria-pressed=true]{background:#1d1d1f1a}
.compose-fields :is(#composeTo,#composeCc,#composeBcc,#composeSubject){font-size:calc(11.2px * var(--avis-text, 1))}
/* Reported directly, with Apple Mail's own list as the picture: "remove the converting a email address into a screen-wide
   pill button. Make it like the uploaded example only" - out of the platform's glass (data-own-look), a plain list beneath
   the field, as wide as an address needs: each address a row - its initials in a circle, the name with the typed word in
   bold, the address beneath it, a hairline between; the first, the one Return takes, light grey. */
.recipient-suggestions{position:absolute;z-index:20;top:calc(100% + 4px);left:70px;width:min(400px,calc(100% - 108px));max-height:320px;overflow:auto;padding:6px;border:1px solid #e5e5ea;border-radius:16px;background:#fff;box-shadow:0 14px 40px rgba(0,0,0,.16)}
.recipient-suggestions[hidden]{display:none}
.recipient-suggestions button{position:relative;width:100%;min-height:48px;display:grid;align-content:center;gap:1px;padding:7px 10px 7px 55px;border:0;border-radius:11px;background:none;color:#1d1d1f;text-align:left}
.recipient-suggestions button::before{content:attr(data-face);content:attr(data-face) / "";position:absolute;left:10px;top:calc(50% - 17px);width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(#acacb4,#8a8a94);color:#fff;font-size:calc(13px * var(--avis-text, 1));font-weight:600;letter-spacing:.02em;text-transform:uppercase}
.recipient-suggestions button[data-face=""]::before{background:radial-gradient(circle at 50% 37%,#fff 0 5px,#fff0 5.5px),radial-gradient(circle at 50% 104%,#fff 0 11px,#fff0 11.5px),linear-gradient(#acacb4,#8a8a94)}
.recipient-suggestions button+button::after{content:"";position:absolute;top:0;left:55px;right:10px;height:1px;background:#e5e5ea}
.recipient-suggestions button:first-child+button::after{display:none}
.recipient-suggestions button:is(:first-child,:hover,:focus-visible){background:#ebebf0;outline:0}
.recipient-suggestions strong{font-size:calc(13.5px * var(--avis-text, 1));font-weight:400;overflow-wrap:anywhere}
.recipient-suggestions small{color:#8e8e93;font-size:calc(11.5px * var(--avis-text, 1));overflow-wrap:anywhere}
.recipient-suggestions b{color:#1d1d1f;font-weight:700}

/* Attachment thumbnails retain the full image/page, with a readable filename. */
.compose-attachment-card > strong { width:52px; height:52px; flex:0 0 52px; overflow:hidden; }
.compose-attachment-card > strong img { object-fit:contain; background:white; }
.compose-attachment-card > strong video { object-fit:cover; background:#111; pointer-events:none; }
.compose-attachment-card > span { overflow-wrap:anywhere; min-width:0; }
.compose-attachment-card { min-width:0; max-width:100%; }

.compose-dialog { container-type:inline-size; max-width:calc(100vw - 32px); }
.compose-resize { position:absolute; right:0; bottom:0; width:24px; height:24px; padding:0; border:0; background:white; color:var(--wine); cursor:nwse-resize; touch-action:none; z-index:2; }
.compose-footer { padding-right:28px; }
.compose-dialog.is-maximized { inset:16px!important; width:auto!important; height:auto!important; max-width:none; max-height:none; margin:0; }
@container (max-width:760px) {
 .compose-grid { display:block; overflow-y:auto; }
 .compose-fields,.compose-avis { overflow:visible; }
 .compose-footer { grid-template-columns:1fr; }
 .compose-footer > div { flex-wrap:wrap; }
}
.file-preview-content { min-height:0; overflow:auto; padding:16px; text-align:center; background:#eee; }
.file-preview-content img,.file-preview-content canvas { max-width:100%; height:auto; background:white; }
.file-preview-content video { display:block; width:auto; height:auto; max-width:100%; max-height:calc(100dvh - 190px); margin:auto; background:#000; }
.file-preview-content audio { width:min(680px,100%); margin:34px auto; }
.file-preview-content[hidden], #filePreviewFrame[hidden] { display:none; }
@media(max-width:900px) {
 .compose-dialog,.compose-dialog.compose-dialog-moved,.compose-dialog.is-maximized { inset:0!important; left:0!important; top:0!important; width:100vw!important; min-width:0; max-width:100vw; height:100dvh!important; max-height:100dvh; margin:0!important; border-radius:0; }
 #composeResize,#composeMaximize { display:none; }
}
/* Reported directly, of the composer shrunk into a corner after a finger near its edge: "The logistic in Mobil screen
   is not stabile". On a phone (window-frame-client.mjs phone) it has no sides to drag and nothing ever scales it
   (app.js bindDialogDrag, bindComposeWindow); a tablet's keeps its sides, like every other window there. */
@media (pointer:coarse) and (max-width:599px),(pointer:coarse) and (max-height:599px){.compose-dialog > .dialog-resize-handle{display:none}.compose-dialog{transform:none!important}}

/* Reported directly ("Every email and message must accept any form of attachment as a drop and
   search in AVISCloud and PC"): a plain file-row list (no thumbnail column - compose attachments
   are any file type, not just the image-oriented Letter Creator asset picker's own .letter-asset-
   option) for picking an already-stored AVISCloud document to attach to an email. */
.compose-cloud-attach-list{grid-column:1/-1;list-style:none;margin:0;padding:0;display:grid;gap:6px;max-height:min(50vh,420px);overflow-y:auto}
.compose-cloud-attach-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;border:1px solid var(--line);border-radius:8px}
.compose-cloud-attach-item-name{min-width:0;display:grid;gap:2px}
.compose-cloud-attach-item-name strong{font-size:calc(12.5px * var(--avis-text, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.compose-cloud-attach-item-name small{color:var(--muted);font-size:calc(10.5px * var(--avis-text, 1))}
.compose-cloud-attach-empty{padding:14px;color:var(--muted);font-size:calc(12px * var(--avis-text, 1));text-align:center}

.document-fields-simple{grid-template-columns:1fr 1fr}
@media(max-width:720px){.document-fields-simple{grid-template-columns:1fr}}

/* Per-user AVISCloud quota and administrator sharing. */
.document-access-selector{width:min(290px,100%);padding:7px;border:1px solid #ded5d8;border-radius:9px;background:#fff}.document-access-selector summary{cursor:pointer;color:#7f172a;font-weight:700}.document-access-users{display:grid;gap:6px;max-height:180px;overflow:auto;margin:9px 0}.document-access-users label{display:flex;align-items:center;gap:7px;margin:0;padding:5px;border-radius:6px;background:#faf8f9}.document-access-users input{width:auto}

.document-preview-button{display:flex;align-items:center;justify-content:center;align-self:start;padding:0;border:0;border-radius:10px;background:transparent;cursor:pointer;overflow:hidden}
.document-preview-button:hover,.document-preview-button:focus-visible{outline:3px solid rgba(127,23,42,.22);outline-offset:3px}
.document-preview-button img{display:block;pointer-events:none}

/* Internal workspace refinement. The public landing hero remains unchanged. */
.app-shell:not(.landing-active) .avisphare-logo{width:58px;height:58px;object-fit:contain}
.app-shell:not(.landing-active) :is(.mail-workspace,.avis-stage,.placeholder-card,.team-chat,.connect-tools-body>section,.document-dialog-shell,.preview-envelope){background:#fff}
.app-shell:not(.landing-active) :is(.team-chat,.connect-tools-body>section,.placeholder-card,.document-dialog-shell,.preview-envelope){border:1px solid rgba(127,23,42,.55);border-radius:0;box-shadow:0 8px 20px rgba(0,0,0,.18)}
.connect-view{background:#fff}
.rail-item img{object-fit:contain;image-rendering:auto}
.rail-item.active img{filter:none!important}
.global-search-results{position:fixed;z-index:90;top:64px;left:calc(var(--rail) + var(--sidebar) + 20px);width:min(720px,calc(100vw - var(--rail) - var(--sidebar) - 44px));max-height:min(560px,70vh);overflow:auto;border:1px solid rgba(127,23,42,.55);border-radius:0;background:#fff;box-shadow:0 12px 28px rgba(0,0,0,.2);padding:8px}
.global-search-results[hidden]{display:none}
.global-search-results header{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border-bottom:1px solid var(--line)}
.global-search-results header small,.global-search-status{color:var(--muted);font-size:calc(11px * var(--avis-text, 1))}.global-search-status{margin:0;padding:12px}
.global-search-row,.global-search-ai{width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;background:#fff;padding:9px 10px;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;color:var(--ink)}
.global-search-row:hover,.global-search-row:focus-visible{background:#f9f5f6}.global-search-row>span{min-width:0}.global-search-row strong,.global-search-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-search-row small{margin-top:2px;color:var(--muted);font-size:calc(11px * var(--avis-text, 1))}.global-search-row em{color:var(--wine);font-size:calc(10px * var(--avis-text, 1));font-style:normal;font-weight:700;text-transform:uppercase}
.global-search-ai{justify-content:center;border-bottom:0;color:#fff;background:var(--wine);font-weight:700;text-align:center}
/* Existing workspace behavior; unchanged by the AVISphare theme. */
.contact-list{gap:1px!important;grid-template-columns:minmax(0,1fr)!important}.contact-list label{min-height:20px;margin:0;padding:3px 6px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:#fff;font-size:calc(9px * var(--avis-text, 1));cursor:pointer}.contact-list label:hover,.contact-list label:focus-visible{background:#f9f5f6;outline:1px solid rgba(127,23,42,.35)}.contact-list label.selected{background:var(--wine-soft)}.contact-list label>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contact-list label .contact-row-edit{flex:0 0 auto;padding:2px 5px;border:1px solid transparent;border-radius:3px;background:transparent;color:var(--muted);font-size:calc(10px * var(--avis-text, 1));line-height:1}.contact-list label .contact-row-edit:hover,.contact-list label .contact-row-edit:focus-visible{border-color:rgba(127,23,42,.35);color:var(--wine);background:#fff}
/* Reported directly: "make me in the empty round dot a green/grey/red button, green = active, grey =
   registered but not used, red = blocked". The open contact keeps a wine ring around its dot. */
.contact-list input.contact-status-dot{appearance:none;-webkit-appearance:none;flex:0 0 auto;width:12px;height:12px;margin:0 2px;border:0;border-radius:50%;background:#9aa0a6;box-shadow:inset 0 -1px 2px rgba(0,0,0,.25);cursor:pointer}
.contact-list input.contact-status-dot[data-status="active"]{background:#2e9d4f}
.contact-list input.contact-status-dot[data-status="blocked"]{background:#c62828}
.contact-list input.contact-status-dot:checked{outline:2px solid var(--wine);outline-offset:2px}
.contact-incubator-editor form{display:flex;flex-direction:column;min-height:0}.contact-incubator-editor form>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--line)}.contact-incubator-editor form>footer{display:flex;justify-content:flex-end;gap:12px;padding-top:14px;margin-top:14px;border-top:1px solid var(--line)}.contact-incubator-editor h2{margin:2px 0 0}.contact-editor-grid{display:flex;flex-direction:column;gap:14px}.contact-editor-grid label{display:grid;gap:5px;font-size:calc(11px * var(--avis-text, 1));font-weight:700}.contact-editor-grid input,.contact-editor-grid select,.contact-editor-grid textarea{width:100%;padding:9px 10px;border:1px solid var(--line);border-radius:0;background:#fff;font:inherit}.contact-editor-row{display:flex;gap:14px}.contact-editor-row>label{flex:1;min-width:0}@media(max-width:480px){.contact-editor-row{flex-direction:column}}
.contact-editor-section{color:var(--wine);font-size:calc(10px * var(--avis-text, 1));font-weight:750;letter-spacing:.14em;text-transform:uppercase}
/* Matches macOS/iOS Contacts' own per-contact card layout (per the Apple reference screenshots):
   related fields sit inside one continuous rounded panel, one field per row, divided by hairlines -
   never each field in its own separately-bordered box the way a plain form grid would. Scoped to
   .contact-editor-card only - the admin-only mailbox-provisioning fields below (no Apple reference
   covers that flow) keep their original bordered-box styling, sharing several of these same classes
   (.contact-editor-picker, label) outside any card. */
.contact-editor-card{border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden}
.contact-editor-card>*{padding:9px 14px;margin:0}
.contact-editor-card>*:not(:first-child){border-top:1px solid var(--line)}
.contact-editor-card .contact-editor-section{padding-bottom:0}
.contact-editor-card label,.contact-editor-card .contact-editor-picker{gap:3px;font-size:calc(9.5px * var(--avis-text, 1))}
.contact-editor-card label>span,.contact-editor-card .contact-editor-picker>span{color:var(--muted);text-transform:uppercase;letter-spacing:.03em;font-weight:700}
.contact-editor-card input,.contact-editor-card select,.contact-editor-card textarea,.contact-editor-card .contact-editor-picker input[type="text"]{padding:0;border:0;border-radius:0;background:transparent;font-size:calc(13px * var(--avis-text, 1))}
:is(.contact-editor-card,.kyc-step) .contact-birthday{display:grid;grid-template-columns:minmax(0,4.5em) minmax(0,1fr) minmax(0,5.5em);gap:10px}:is(.contact-editor-card,.kyc-step) .contact-birthday select{min-width:0}
.contact-editor-card .contact-multi-row .contact-multi-label,.contact-editor-card .contact-multi-row .contact-multi-value{padding:0;border:0;background:transparent}
.contact-editor-notes{display:grid;gap:5px}
/* Apple Contacts' own multi-value field pattern (Email/Phone/Instant Message): one row per entry,
   each with its own label/service select, a "+" to add another - see buildContactMultiRow in app.js. */
.contact-editor-multi{display:grid;gap:6px}
.contact-editor-multi>label{display:grid;gap:5px;font-size:calc(11px * var(--avis-text, 1));font-weight:700}
.contact-multi-heading{font-size:calc(11px * var(--avis-text, 1));font-weight:700;margin:0}
.contact-multi-row{display:flex;gap:6px;align-items:center}
.contact-multi-row .contact-multi-label{flex:0 0 108px;padding:9px 8px;border:1px solid var(--line);border-radius:0;background:#fff;font:inherit;font-size:calc(11px * var(--avis-text, 1));text-transform:capitalize}
.contact-multi-row .contact-multi-value{flex:1;min-width:0;padding:9px 10px;border:1px solid var(--line);border-radius:0;background:#fff;font:inherit}
.contact-multi-remove{flex:0 0 auto;width:28px;height:28px;border:1px solid var(--line);background:#fff;cursor:pointer;font-size:calc(16px * var(--avis-text, 1));line-height:1;color:var(--wine)}
.contact-multi-remove:active{background:var(--line)}
.contact-editor-card .contact-multi-remove{border:0;border-radius:50%;background:var(--line)}
.contact-editor-card .contact-multi-remove:active{background:var(--wine-soft)}
.contact-multi-extra{display:grid;gap:6px}
.contact-multi-add{justify-self:start;border:0;background:none;color:var(--wine);font-size:calc(11px * var(--avis-text, 1));font-weight:700;cursor:pointer;padding:2px 0;text-decoration:underline}
.contact-multi-add:active{opacity:.6}
/* Reported directly ("'Select your private team member' must be a search and selector of another
   contact from the database" / "make here a contact selector for pickup the manager"): a real,
   searched-as-you-type picker against the actual contacts list (matchContacts in app.js), not a
   plain <select> - used for both the single-pick team-member field and the multi-pick manager
   chips below it. */
.contact-editor-picker{display:grid;gap:5px;font-size:calc(11px * var(--avis-text, 1));font-weight:700;position:relative}
.contact-editor-picker>span{font-size:calc(11px * var(--avis-text, 1));font-weight:700}
.contact-editor-picker input[type="text"]{width:100%;padding:9px 10px;border:1px solid var(--line);border-radius:0;background:#fff;font:inherit;font-weight:400}
.contact-picker-matches{position:absolute;z-index:5;top:100%;left:0;right:0;margin:2px 0 0;padding:0;list-style:none;max-height:180px;overflow-y:auto;border:1px solid var(--line);background:#fff;box-shadow:0 4px 10px rgba(0,0,0,.08)}
.contact-picker-matches li{padding:7px 10px;font-size:calc(11px * var(--avis-text, 1));font-weight:400;cursor:pointer;display:flex;flex-direction:column;gap:1px}
.contact-picker-matches li .contact-picker-match-name{font-weight:700;color:var(--ink)}
.contact-picker-matches li .contact-picker-match-detail{color:var(--muted);font-size:calc(10px * var(--avis-text, 1))}
.contact-picker-matches li:hover,.contact-picker-matches li:focus-visible,.contact-picker-matches li.active{background:var(--wine-soft)}
.contact-picker-selected{display:flex;align-items:center;gap:8px;margin:0;padding:7px 10px;border:1px solid var(--line);background:#fff;font-size:calc(11px * var(--avis-text, 1));font-weight:700;color:var(--ink)}
.contact-picker-selected button{flex:0 0 auto;border:0;background:none;color:var(--wine);font-size:calc(14px * var(--avis-text, 1));line-height:1;cursor:pointer;font-weight:700}
.contact-chip-list{display:flex;flex-wrap:wrap;gap:6px}
.contact-chip-list:empty{display:none}
.contact-chip{display:flex;align-items:center;gap:6px;padding:5px 6px 5px 10px;border:1px solid var(--line);border-radius:999px;background:var(--wine-soft);font-size:calc(11px * var(--avis-text, 1));font-weight:700;color:var(--ink)}
.contact-chip button{flex:0 0 auto;width:16px;height:16px;display:grid;place-items:center;border:0;border-radius:999px;background:#fff;color:var(--wine);font-size:calc(11px * var(--avis-text, 1));line-height:1;cursor:pointer}
.contact-editor-empty{margin:0 0 4px;color:var(--muted);font-size:calc(12px * var(--avis-text, 1));line-height:1.6}
@media(max-width:720px){.global-search-results{top:58px;left:8px;width:calc(100vw - 16px)}}

/* Contact Incubator - its own launcher in the app rail (below AVISCloud) and popup window, kept out of the Messages tools panel */
/* No display: here - a native <dialog> is already display:none until [open] is set by
   show()/showModal(); overriding that on the dialog element itself (rather than an inner
   wrapper) makes it render at all times regardless of open state, including before sign-in. */
/* Non-modal (opened via .show(), never .showModal()): a real floating window, not a modal box -
   no ::backdrop, and the rest of the page stays interactive while it's open. An explicit
   z-index keeps it above everything else now that it isn't promoted to the browser's top layer.
   height is explicit (not just max-height, relying on fit-content auto sizing) - a non-modal,
   position:fixed dialog with inset:0 and no explicit height is reported to collapse to near-zero
   height on iPad Safari/WebKit (renders as a hairline), even though the equivalent fit-content
   sizing works fine in Chromium; Letter Creator, which always had an explicit height, never hit
   this. The resize handle still lets the user make it taller if they need to. */
/* "Add a tool to the messaging and emails that authorise direct recording of a video and make
   photos for instantly sending." A floating window like every other tool in this app (no blur
   backdrop - see the compose and reader-panel fixes above), draggable by its header via
   bindDialogDrag, matching the rest of the floating-window family at z-index:95. */

/* Existing workspace behavior; unchanged by the AVISphare theme. */
/* Reported directly ("Just make all windows full size... opens full screen size or I can drag it
   how I want"): a top-level window (opened fresh, not a smaller picker triggered from inside one -
   see .letter-gallery-dialog's own comment) now opens at its full available size by default,
   matching the standard desktop convention of a maximized launch that the user can still freely
   drag/resize smaller afterward - width used to cap at a fixed 540px regardless of screen size;
   height already defaulted full. */
/* Existing workspace behavior; unchanged by the AVISphare theme. */
.admin-embed-dialog{position:fixed;inset:0;z-index:95;width:calc(100vw - 28px);height:calc(100dvh - 28px);max-height:100dvh;margin:auto;padding:0;overflow:hidden;border:1px solid #9f1831;border-radius:12px;background:#fff;box-shadow:0 32px 100px rgba(13,8,10,.46);box-sizing:border-box}
.admin-embed-dialog iframe{display:block;width:100%;height:100%;border:0}
.admin-embed-dialog.admin-embed-collapsed{inset:auto;top:auto;left:auto;right:16px;bottom:16px;width:300px;height:56px;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.28)}
.contact-incubator-dialog{position:fixed;inset:0;z-index:95;width:calc(100vw - 28px);height:calc(100dvh - 28px);max-height:100dvh;margin:auto;padding:0;overflow:hidden;border:1px solid #9f1831;border-radius:12px;background:#fff;box-shadow:0 32px 100px rgba(13,8,10,.46);box-sizing:border-box}
.contact-incubator-shell{height:100%;max-height:100dvh;display:flex;flex-direction:column}
/* Existing workspace behavior; unchanged by the AVISphare theme. */
body.embed-contact-incubator{background:#fff}
body.embed-contact-incubator .app-shell,body.embed-contact-incubator .mobile-scrim{display:none!important}
/* Desktop app: Letter Creator / AVISCloud as their own OS windows (embed-bootstrap.js). */
body.embed-letter .app-shell,body.embed-letter .mobile-scrim,body.embed-compose .app-shell,body.embed-compose .mobile-scrim,body.embed-conference .app-shell,body.embed-conference .mobile-scrim{display:none!important}
body.embed-letter .letter-creator-dialog{inset:0;width:100vw;height:100dvh;min-width:0;min-height:0;max-width:none;max-height:none;margin:0;transform:none}
body:is(.embed-documents,.embed-messages) :is(.topbar,.app-rail,.mail-nav,.app-header-menu,.mobile-scrim){display:none!important}
body:is(.embed-documents,.embed-messages) .app-shell{grid-template:minmax(0,1fr)/minmax(0,1fr);height:100dvh}
body:is(.embed-documents,.embed-messages) .main-surface{grid-column:1;grid-row:1}
/* Reported directly, from AVISCloud in its own window on an iPad: "could not going back missing going back and X" - in its
   own window AVISCloud has its back arrow and its X (app.js closeOwnWindow); in the AVISphere and in a floating window of
   another page, whose own bar has them, not. */
.documents-window-bar{display:none}
body.embed-documents:not(.embed-in-page) .documents-window-bar{display:flex;justify-content:space-between;margin-bottom:10px}
/* One window, not two: inside its own desktop-app window the dialog fills the window edge to edge.
   Then, with the writer on a phone in the app as the picture: "Never glue into the corners handling details as this is in
   mobile and all devised always fro system used", and "yes all windows" - edge to edge between a phone's or an iPad's own
   line (time, battery) and its foot, as the page's own windows are (--safe-top, --safe-bottom below); nothing where a
   screen has no such line.
   Reported directly, the composer as an iPad window of its own: "overly bank covering the footer buttons" - it ends above
   the band the iPad's keyboard keeps (--seen-cut, bindSeenScreen in app.js), as the AVISphere's windows do. */
body.embed-desktop-window{background:#fff}
body.embed-desktop-window :is(#contactIncubatorDialog,#letterCreatorDialog,#letterGalleryDialog,#composeDialog,#conferenceDialog){position:fixed!important;inset:var(--safe-top) 0 var(--safe-bottom)!important;width:100vw!important;height:calc(100dvh - var(--safe-top) - var(--safe-bottom))!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;transform:none!important}
body.embed-desktop-window :is(#contactIncubatorMinimize,#contactIncubatorFullscreen,#letterCreatorFullscreen,#letterGalleryFullscreen,#composeMaximize,#composeResize,#conferenceFullscreen,.dialog-resize-handle,[data-dialog-resize]){display:none!important}
/* Reported directly ("new email creation is not live there"): toasts used to be hidden here right
   alongside the rest of the app's own chrome (nav, other dialogs) - but a toast is the ONLY
   feedback Save/Delete/etc. ever give, and .toast-region is a self-contained position:fixed
   overlay with no dependency on .app-shell's own layout, so hiding it here was never necessary.
   Every save inside this admin iframe was actually succeeding - confirmed live, a real HTTP 200
   with the new email round-tripped into the saved record - but with the toast invisible, nothing
   on screen ever showed it worked, reading as "not live"/broken. Toasts now render here too. */
/* Codex review finding (P2), since superseded: #contactIncubatorClose used to call .close()
   unconditionally even in embed mode, but the only launcher that could reopen the dialog lives
   inside .app-shell, hidden above - and initMailboxes() only ever calls openContactIncubator() once,
   on ?embed=contacts load - so clicking the visible X left the admin's iframe permanently blank
   until the whole iframe reloaded. The fix then was to hide the button outright; reported directly
   ("missing a closing x"), that just traded a broken X for a missing one. Close now collapses the
   dialog in embed mode instead (app.js's own click handler), the exact same corner-pill behaviour
   Minimize already gives, so it stays visible and does something useful here too. */
.contact-incubator-header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line);cursor:grab;touch-action:none;user-select:none}.contact-incubator-header.dragging{cursor:grabbing}
/* Reported directly ("missing a closing x... did come up squeezed" on an iPad): a flex item's
   default min-width is auto, not 0 - without this, the title refused to shrink below its own full
   text width, so at the squeezed touch-device dialog width above it could push the action buttons
   (Close included) past the dialog's right edge, clipped there by .contact-incubator-dialog's own
   overflow:hidden. Truncating instead guarantees the header's buttons always stay on-screen,
   whatever the dialog's width ends up being. */
.contact-incubator-header strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:calc(18px * var(--avis-text, 1));letter-spacing:.04em;color:var(--wine-deep)}
.dialog-header-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
/* Native resize:both isn't touch-operable on iOS/iPadOS (no drag affordance renders), so both
   floating windows use this custom pointer-driven handle instead, on every device. */
/* Reported directly: the composer's resize handle "not responsive" on the right/bottom edge. A
   28px hit target is below Apple's own 44px minimum recommended touch target - a finger landing
   even a couple of px outside it never starts a pointerdown on the handle at all, which reads as
   "nothing happens" rather than a visible near-miss. Widened to a real touch-sized target.
   Reported directly again ("No marking any handles and movable just by touch from all corners or
   side"): the striped gradient below used to draw a visible icon in just this one corner, while
   the other 7 directions just below were already invisible (background:none) - an inconsistent,
   only-partly-handle-less result. Every direction is now the same plain, unmarked, touch-sized hit
   area; nothing on any edge or corner is visually marked as a handle, anywhere on the window. */
.dialog-resize-handle{position:absolute;z-index:5;right:1px;bottom:1px;width:44px;height:44px;cursor:nwse-resize;touch-action:none;background:none}
/* On a phone (its shorter side under 600px, either way round) no window has sides to drag: a finger near its edge
   scrolls (window-frame-client.mjs phone). */
@media (pointer:coarse) and (max-width:599px),(pointer:coarse) and (max-height:599px){.dialog-resize-handle{display:none}}
/* Reported directly ("a floating window must be handled from every side... never blocked"): only
   the bottom-right corner above was ever a resize handle - every real OS window lets you grab any
   edge or corner. These 7 share that same handle's pointer wiring (bindDialogDrag reads each one's
   own data-dialog-resize value to know which edge(s) it moves) but reset its corner-only
   positioning/decoration: edges are an invisible touch-sized strip (cursor only, no visual chrome,
   inset past the corners so a corner handle's own hit area always wins at the overlap), corners
   are a plain square sized like the edges rather than the original's larger decorated square. */
.dialog-resize-handle.dialog-resize-n,.dialog-resize-handle.dialog-resize-s{left:18px;right:18px;width:auto;height:14px;background:none}
.dialog-resize-handle.dialog-resize-e,.dialog-resize-handle.dialog-resize-w{top:18px;bottom:18px;height:auto;width:14px;background:none}
.dialog-resize-handle.dialog-resize-n{top:0;bottom:auto;cursor:ns-resize}
.dialog-resize-handle.dialog-resize-s{bottom:0;top:auto;cursor:ns-resize}
.dialog-resize-handle.dialog-resize-e{right:0;left:auto;cursor:ew-resize}
.dialog-resize-handle.dialog-resize-w{left:0;right:auto;cursor:ew-resize}
.dialog-resize-handle.dialog-resize-ne,.dialog-resize-handle.dialog-resize-nw,.dialog-resize-handle.dialog-resize-sw{width:18px;height:18px;right:auto;bottom:auto;background:none}
.dialog-resize-handle.dialog-resize-ne{top:0;right:0;left:auto;cursor:nesw-resize}
.dialog-resize-handle.dialog-resize-nw{top:0;left:0;cursor:nwse-resize}
.dialog-resize-handle.dialog-resize-sw{bottom:0;left:0;top:auto;cursor:nesw-resize}
.letter-creator-dialog.dialog-fullscreen,.letter-gallery-dialog.dialog-fullscreen,.conference-dialog.dialog-fullscreen,.contact-incubator-dialog.dialog-fullscreen{inset:0!important;left:auto!important;top:auto!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;margin:0!important;border-radius:0!important}
.letter-creator-dialog.dialog-fullscreen .dialog-resize-handle,.letter-gallery-dialog.dialog-fullscreen .dialog-resize-handle,.conference-dialog.dialog-fullscreen .dialog-resize-handle,.contact-incubator-dialog.dialog-fullscreen .dialog-resize-handle{display:none}
/* Reported directly: an earlier fullscreen toggle on this dialog made it "too large to close
   again" - the header (title/minimize/fullscreen/close) always stays visible at flex:0 0 auto
   regardless of fullscreen state (see .contact-incubator-header above), so re-adding it here keeps
   every one of those controls reachable in fullscreen too, unlike whatever the earlier attempt did. */
/* Existing workspace behavior; unchanged by the AVISphare theme. */
.contact-incubator-dialog.contact-incubator-minimized{position:fixed!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%);margin:0!important;width:280px!important;height:auto!important;min-height:0!important}
.contact-incubator-dialog.contact-incubator-minimized .contact-incubator-body,.contact-incubator-dialog.contact-incubator-minimized .dialog-resize-handle{display:none}
.contact-incubator-dialog.contact-incubator-minimized .contact-incubator-header{cursor:grab;border-bottom:0}
.contact-incubator-rail{flex:0 0 auto;width:72px;display:flex;flex-direction:column;align-items:stretch;gap:2px;padding:10px 6px;overflow-y:auto;background:#faf4f5;border-right:1px solid var(--line)}
.contact-rail-button{display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 2px;border:0;border-radius:8px;background:transparent;color:#a60505;font-size:calc(9px * var(--avis-text, 1));font-weight:700;line-height:1.1;text-align:center;cursor:pointer}
.contact-rail-button:hover{background:var(--quiet)}
.contact-rail-button[aria-pressed="true"]{background:rgba(127,23,42,.14)}
.contact-rail-button:disabled,.contact-rail-button.is-blocked{opacity:.35;cursor:default}
.contact-rail-button:disabled:hover,.contact-rail-button.is-blocked:hover{background:transparent}
.contact-rail-button svg{width:24px;height:24px}
.contact-rail-id{flex:0 0 auto;margin:2px 0;padding:4px 2px;font-size:calc(8px * var(--avis-text, 1));font-weight:700;letter-spacing:.03em;color:var(--muted);text-align:center;word-break:break-all}
@media(max-width:1024px),(hover:none) and (pointer:coarse){.contact-incubator-rail{width:60px}.contact-rail-button span{display:none}.contact-rail-button svg{width:26px;height:26px}}
/* Apple Contacts-style two-pane layout: the searchable list (left) never hides behind the editor
   (right) - each pane scrolls independently instead of the previous all-or-nothing panel toggle. */
.contact-incubator-body{min-height:0;flex:1 1 auto;display:flex;overflow:hidden}
/* Existing workspace behavior; unchanged by the AVISphare theme. */
.contact-incubator-contacts{flex:0 0 220px;display:flex;flex-direction:column;min-height:0;padding:12px;border-right:1px solid var(--line);overflow:hidden}
.contact-incubator-contacts[hidden]{display:none}
.contact-incubator-editor form,.contact-incubator-editor>.contact-incubator-identity{max-width:640px}
.contact-editor-id{margin:2px 0 0;font-size:calc(10px * var(--avis-text, 1));font-weight:700;letter-spacing:.03em;color:var(--muted)}
/* Matches iOS Contacts' own "1 Duplicate Found" banner (per the Apple reference screenshot): a
   quiet notice right under the contact's own name, never a blocking dialog on open. */
.contact-duplicate-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 0;padding:8px 12px;border-radius:8px;background:var(--wine-soft);color:var(--wine-deep);font-size:calc(11px * var(--avis-text, 1));font-weight:600}
.contact-duplicate-banner button{flex:none;border:0;background:none;padding:0;color:var(--wine);font-size:calc(11px * var(--avis-text, 1));font-weight:750;text-decoration:underline;cursor:pointer}
/* Three distinct, correctly-routed synchronisers (Google cloud pull-sync; Apple/Android reuse the
   already-built native Mac Contacts.app sync and Capacitor Contacts plugin) replacing the single
   generic "Sync from device" button - a real synchroniser per platform, not a one-time picker. */
.contact-sync-menu{display:flex;flex-direction:column;gap:8px;margin-bottom:8px;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fff}
.contact-sync-row{display:grid;grid-template-columns:1fr;gap:3px}
.contact-sync-row-label{font-size:calc(10px * var(--avis-text, 1));font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--wine)}
.contact-sync-row-status{margin:0;font-size:calc(10.5px * var(--avis-text, 1));line-height:1.4;color:var(--muted)}
.contact-sync-row-actions{display:flex;gap:10px}
.link-button{border:0;background:none;padding:0;color:var(--wine);font-size:calc(10.5px * var(--avis-text, 1));font-weight:750;text-decoration:underline;cursor:pointer}
.contact-incubator-contacts .contact-actions{flex:0 0 auto;display:flex;flex-direction:column;gap:5px;margin-bottom:8px}
.contact-incubator-contacts .contact-actions .secondary-button{width:100%;height:26px;padding:0 6px;font-size:calc(8.5px * var(--avis-text, 1))}
/* "contact search scroller fully hight window" - not .contact-list's 160px */
.contact-incubator-contacts .contact-list{flex:1 1 auto;overflow-y:auto;min-height:0;max-height:none}
.contact-incubator-editor{flex:1 1 auto;min-width:0;min-height:0;overflow-y:auto;padding:18px}
/* Reported directly: "activate in the Contact incubator a upload of ID all type and a proof of address all
   type ... Via the app we must make a bio scan of the user". The Identity tool takes the editor's place. */
.contact-identity{flex:1 1 auto;min-width:0;min-height:0;overflow-y:auto;padding:18px;display:grid;align-content:start;gap:14px}
.contact-identity:not([hidden]) ~ .contact-incubator-editor{display:none}
.contact-identity header h2{margin:2px 0 6px}
.kyc-state{margin:0;padding:8px 12px;border-radius:10px;background:var(--quiet);font-weight:700;font-size:calc(13px * var(--avis-text, 1))}
.kyc-state[data-state="operative"]{background:#f6e9ea;color:var(--wine)}.kyc-state[data-state="review"],.kyc-state[data-state="screening"]{background:#fdf3e1;color:#7a5a12}.kyc-state[data-state="rejected"]{background:#fbe9e9;color:#9b1c20}
.kyc-step{display:grid;gap:10px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff}
.vendor-cards{display:grid;gap:14px}.vendor-cards p{margin:0}.vendor-cards h3,.vendor-cards h4{margin:0}
.vendor-no{font-size:calc(34px * var(--avis-text, 1));font-weight:800;letter-spacing:.06em;line-height:1;color:var(--wine)}.vendor-status{font-size:calc(12px * var(--avis-text, 1));font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.vendor-plan{display:grid;gap:4px;padding-top:10px;border-top:1px solid var(--line)}.vendor-plan ul{margin:4px 0 0;padding-left:18px;font-size:calc(13px * var(--avis-text, 1))}.vendor-card > button{justify-self:start}
.kyc-step h3{margin:0;font-size:calc(14px * var(--avis-text, 1));letter-spacing:.04em}
.kyc-step.is-done h3::after{content:" ✓";color:var(--wine)}
.kyc-step label{display:grid;gap:5px;font-size:calc(12px * var(--avis-text, 1));font-weight:600}
.kyc-step input,.kyc-step select{min-height:40px}
.kyc-files{margin:0;padding-left:18px;font-size:calc(12px * var(--avis-text, 1));color:var(--muted)}
/* Reported directly: "there should be as well camera option for passport or ID and proof of address" - Take photo beside the
   file field, the Bio scan button's own icon look. */
.kyc-pick{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}.kyc-pick label{flex:1 1 220px;min-width:0}
.kyc-photo{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px}.kyc-photo svg{width:18px;height:18px;fill:none;stroke:currentColor}
/* The Contact Incubator's corporate register (corporate-register.mjs). */
.company-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.company-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.company-bar select{min-height:40px;flex:1 1 220px}
.company-body{display:grid;gap:14px}.company-form{display:grid;gap:14px}
.contact-bond input[type=search]{min-height:40px}.bond-team{list-style:none;margin:0;padding:0;display:grid;gap:6px}.bond-team li{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:10px}.bond-team li>span:nth-child(2){flex:1;display:grid;min-width:0}.bond-team small{color:var(--muted);overflow:hidden;text-overflow:ellipsis}.bond-light{flex:none;width:12px;height:12px;border-radius:50%;background:#c62828}.bond-light.on{background:#2e7d32}
.company-steps{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:6px}
.company-steps li{padding:5px 10px;border:1px solid var(--line);border-radius:999px;font-size:calc(12px * var(--avis-text, 1));background:#fff}
.company-steps li.is-done{border-color:var(--wine);color:var(--wine)}.company-steps li.is-done::before{content:"✓ "}
.company-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.company-fields .company-wide{grid-column:1/-1}.company-fields textarea{resize:vertical}
.company-fields :is(input,select,textarea),.company-holder input{width:100%;min-width:0;box-sizing:border-box}
.company-body .kyc-step > :is(button,input[type=file]){justify-self:start}
.company-holder{display:grid;grid-template-columns:2fr 2fr 1fr auto;gap:6px;align-items:center}
.company-note{margin:0;font-size:calc(12px * var(--avis-text, 1));color:var(--muted)}.company-returned{color:#9b1c20}
.company-document{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:calc(12px * var(--avis-text, 1))}
.company-viewer{flex:1 1 100%;width:100%;height:420px;border:1px solid var(--line);border-radius:10px;object-fit:contain;background:#fff}
.company-vault{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:4px 0}
/* A card of the vault is a column that never wraps. Wrapping, with its first page's picture in it, it made Chrome lay the
   company out anew on every press of a button (the press effect was enough): the company panel jumped up and the click
   landed beside the button, so no button of a company with a document in its vault worked. An open document keeps its
   viewer's height there, never the 150 pixels of an empty frame. */
.company-vault .company-card{flex-direction:column;flex-wrap:nowrap;align-items:stretch;padding:8px;border:1px solid var(--line);border-radius:10px;background:#fff}.company-vault .company-card.is-open{grid-column:1/-1}.company-vault .company-card > .company-viewer{flex:none}
.company-vault .company-card > span{overflow-wrap:anywhere}.company-vault .company-card > .link-button{align-self:flex-start}
.company-first-page{display:block;width:100%;aspect-ratio:1/1.414;object-fit:contain;border-radius:6px;background:#f6f5f4}.company-card.is-open .company-first-page{display:none}
.company-earlier{font-size:calc(12px * var(--avis-text, 1))}.company-earlier summary{cursor:pointer;color:var(--muted)}.company-earlier .company-document{margin-top:6px}
@media(max-width:720px){.company-vault{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:420px){.company-vault{grid-template-columns:1fr}}
.company-application{display:grid;grid-template-columns:max-content 1fr;gap:4px 12px;margin:0;font-size:calc(12px * var(--avis-text, 1))}.company-application dt{font-weight:700}.company-application dd{margin:0}
.company-terms{display:flex;gap:8px;align-items:center;margin:4px 0;font-size:calc(13px * var(--avis-text, 1))}.company-asset{display:grid;gap:4px;padding:10px 0;border-top:1px solid var(--line);font-size:calc(13px * var(--avis-text, 1))}.company-asset-form{display:grid;gap:10px;margin-top:8px}.company-asset-form > button{justify-self:start}.company-asset-review{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:calc(12px * var(--avis-text, 1))}.company-account .company-application dd{overflow-wrap:anywhere}
.company-isin{margin:0;font:700 calc(14px * var(--avis-text, 1))/1.2 ui-monospace,monospace;letter-spacing:.06em}
.company-symbol{margin:0;display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}.company-symbol b{font:800 calc(20px * var(--avis-text, 1))/1 ui-monospace,monospace;letter-spacing:.08em;color:var(--wine)}
.company-review{display:grid;gap:6px;padding:10px 0;border-top:1px solid var(--line)}
.company-sandbox{display:inline-block;margin-left:6px;padding:2px 8px;border:1px solid var(--line);border-radius:999px;font-size:calc(10px * var(--avis-text, 1));font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);vertical-align:middle}
.company-actions{display:flex;gap:8px;flex-wrap:wrap}
.company-agents{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px}
.company-agent{display:grid;gap:4px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
.company-agent span{font-size:calc(10px * var(--avis-text, 1));font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--wine)}.company-agent b{font-size:calc(16px * var(--avis-text, 1))}
.company-agent small{font-size:calc(11px * var(--avis-text, 1));color:var(--muted)}
.company-meeting{display:grid;gap:4px;padding:10px 0;border-top:1px solid var(--line)}
.company-meeting-head{margin:0;display:flex;gap:10px;align-items:baseline;justify-content:space-between}.company-meeting-head b{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.company-outcome{flex:none;padding:2px 9px;border:1px solid var(--line);border-radius:999px;font-size:calc(11px * var(--avis-text, 1));font-weight:700;color:var(--muted)}.company-outcome.is-carried{border-color:var(--wine);color:var(--wine)}
.company-reader{height:auto;max-height:520px;overflow:auto;padding:18px 22px;white-space:pre-wrap;text-align:left;font:calc(14px * var(--avis-text, 1))/1.6 Georgia,"Times New Roman",serif;color:#1d1a17}
.company-books-bar{align-items:center}.company-books-bar [aria-pressed="true"]{border-color:var(--wine);color:var(--wine)}.company-books-bar select{min-height:36px;margin-left:auto}
.company-entry{display:grid;gap:8px}.company-entry-lines{display:grid;gap:6px}.company-entry-head{display:grid;grid-template-columns:minmax(140px,200px) minmax(0,1fr);gap:6px}.company-entry-head input{width:100%;min-width:0;box-sizing:border-box}
.company-journal .company-table td.num{width:18%}
.company-entry-line{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto;gap:6px;align-items:center}.company-entry-line :is(select,input){width:100%;min-width:0;box-sizing:border-box}
.company-table{width:100%;border-collapse:collapse;font-size:calc(12px * var(--avis-text, 1))}.company-table :is(th,td){padding:5px 6px;border-bottom:1px solid var(--line);text-align:left}
.company-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.company-table .is-total td{font-weight:700;border-bottom-color:var(--ink)}
.company-table .is-head td{padding-top:12px;font-size:calc(10px * var(--avis-text, 1));font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--wine)}
.company-journal{display:grid;gap:10px}.company-journal-entry{display:grid;gap:4px;padding-top:8px;border-top:1px solid var(--line)}.company-journal-entry.is-reversed{color:var(--muted)}
.company-journal-head{margin:0;display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;font-size:calc(12px * var(--avis-text, 1))}
.company-audit{display:grid;gap:8px;padding-top:10px;border-top:1px solid var(--line)}
.company-checks{margin:0;padding:0;list-style:none;display:grid;gap:6px}.company-checks li{display:grid;grid-template-columns:auto 1fr;gap:2px 8px;align-items:center;font-size:calc(12px * var(--avis-text, 1))}.company-checks small{grid-column:2;color:var(--muted)}
.company-dot{width:9px;height:9px;border-radius:50%;background:#9b1c20}.company-checks .is-ok .company-dot{background:#2f8a3b}
.company-employee-form{align-items:end}.company-employee-form label{display:grid;gap:4px;font-size:calc(12px * var(--avis-text, 1))}.company-employee-form :is(input,select){width:100%;min-width:0;box-sizing:border-box}
.company-staff .company-entry-lines{max-width:560px}
.company-employee{display:grid;gap:4px;padding-top:8px;border-top:1px solid var(--line)}.company-employee.is-ended{color:var(--muted)}.company-employee .num{margin-left:auto;font-variant-numeric:tabular-nums}
.company-employee .company-actions input{min-height:32px}.company-bracket{grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto}.company-audit.is-reversed{color:var(--muted)}
.company-scroll{overflow-x:auto}.company-months{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0;padding:8px 10px;border:1px solid var(--line);border-radius:10px}.company-months legend{font-size:calc(12px * var(--avis-text, 1));padding:0 4px}
.company-month{display:flex;gap:6px;align-items:center;font-size:calc(12px * var(--avis-text, 1))}.company-employee-form .company-month input{width:auto;min-height:0}.company-listing{display:grid;gap:8px;padding-top:10px;border-top:1px solid var(--line)}
@media (max-width:720px){.company-holder{grid-template-columns:1fr 1fr}.company-entry-line{grid-template-columns:1fr 1fr auto}.company-entry-line select{grid-column:1/-1}}
.kyc-bio-state{margin:0;font-size:calc(13px * var(--avis-text, 1))}
.kyc-camera{width:min(320px,100%);aspect-ratio:4/3;object-fit:cover;border-radius:12px;background:#000;transform:scaleX(-1)}
#kycBioStart{display:inline-flex;align-items:center;gap:8px;justify-self:start;min-height:40px;padding:0 16px;border:0;border-radius:10px;background:var(--wine);color:#fff;font-weight:700;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.2)}#kycBioStart svg{width:18px;height:18px;fill:none;stroke:currentColor}#kycBioStart:disabled{opacity:.6;cursor:progress}
.contact-incubator-identity{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}
.contact-avi-section{margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.contact-avi-section .letter-avi-log{min-height:60px;max-height:116px}
.contact-search-field{display:grid;gap:4px;margin:0 0 8px;color:var(--muted);font-size:calc(9px * var(--avis-text, 1));font-weight:700;text-transform:uppercase}.contact-search-field input{width:100%;min-height:32px;padding:0 8px;border:1px solid #ddd4d6;border-radius:6px;background:#fff;color:var(--ink);font:calc(11px * var(--avis-text, 1))/1.2 inherit;text-transform:none}
.contact-incubator-body .eyebrow{color:var(--wine);font-size:calc(10px * var(--avis-text, 1));font-weight:750;letter-spacing:.14em;text-transform:uppercase}
.contact-incubator-body h2{margin:2px 0 6px}
.identity-logo-row{display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;align-items:center}
.identity-logo-preview{width:96px;height:96px;display:grid;place-items:center;border:0;border-radius:8px;background:var(--wine-soft);overflow:hidden}
.identity-logo-preview img{width:100%;height:100%;object-fit:contain}
.identity-logo-summary{display:flex;flex-direction:column;gap:8px}
.identity-logo-summary p{margin:0;color:#5f585b;font-size:calc(12px * var(--avis-text, 1));line-height:1.5}
.identity-logo-editor{margin-top:14px;display:flex;flex-direction:column;gap:8px}
.external-mail-servers{margin:4px 0 0;padding:10px 12px 12px;border:1px solid var(--line);display:flex;flex-direction:column;gap:8px;min-width:0}
.external-mail-servers[hidden]{display:none}
.external-mail-servers legend{padding:0 6px;color:var(--wine);font-size:calc(11px * var(--avis-text, 1));font-weight:650}
.external-mail-servers label{display:grid;gap:4px}
.identity-logo-describe{display:grid;gap:5px;font-size:calc(11px * var(--avis-text, 1));font-weight:700;color:var(--wine-deep)}
.identity-logo-describe textarea{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:6px;background:#fff;font:inherit;font-size:calc(12px * var(--avis-text, 1));resize:vertical}
.identity-status{margin:10px 0 0;color:var(--muted);font-size:calc(11px * var(--avis-text, 1));line-height:1.5;min-height:14px}
.identity-status.error,.identity-status.success{display:flex;align-items:center;gap:6px;font-weight:600}
.identity-status.error{color:#a01530}
.identity-status.success{color:#1c7a3b}
.identity-status.error::before,.identity-status.success::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;flex:none}
.identity-status.error::before{background:#a01530}
.identity-status.success::before{background:#1c7a3b}
.activation-qr{margin:12px 0 0;padding:10px;border:1px solid var(--line);border-radius:6px;background:#fff;width:max-content;max-width:100%;text-align:center}
.activation-qr img{display:block;width:180px;height:180px;max-width:100%}
.activation-qr figcaption{margin-top:6px;max-width:180px}
.identity-alias{margin:8px 0 0;padding:7px 10px;border-radius:6px;background:var(--wine-soft);color:var(--wine-deep);font-size:calc(11px * var(--avis-text, 1));font-weight:650}
/* Matches macOS System Settings -> Internet Accounts (per the Apple reference screenshot): one
   continuous bordered panel, hairline dividers between rows (never individually boxed cards), each
   row an icon + bold account name + a muted status line underneath, no bullet/number styling. */
.external-mail-account-list{list-style:none;margin:0 0 10px;padding:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
.external-mail-account-list li{display:flex;align-items:center;gap:10px;padding:9px 12px;border-bottom:1px solid var(--line);font-size:calc(12px * var(--avis-text, 1))}
.external-mail-account-list li:last-child{border-bottom:0}
.external-mail-account-list .external-mail-account-empty{color:var(--muted);font-style:italic}
.external-mail-account-icon{flex:none;width:30px;height:30px;border-radius:7px;display:grid;place-items:center;background:var(--wine);color:#fff}
.external-mail-account-icon svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}
.external-mail-account-choice{display:flex;align-items:center;gap:10px;cursor:pointer;min-width:0;flex:1}
.external-mail-account-choice input[type="radio"]{flex:none;margin:0}
.external-mail-account-text{min-width:0;display:grid;gap:1px}
.external-mail-account-text strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650;color:var(--ink)}
.external-mail-account-text span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:calc(10.5px * var(--avis-text, 1))}
.external-mail-account-inactive .external-mail-account-icon{background:var(--muted)}
.external-mail-account-inactive .external-mail-account-text strong{color:var(--muted)}
/* Reported directly ("the handling with a blocked window in height is very hard" on an iPad): this
   used to collapse the dialog back down to a cramped min(420px,88dvh) on ANY touch device
   ((hover:none) and (pointer:coarse) matches an iPad regardless of its actual screen size), undoing
   the full-height default above for exactly the devices where a small, hard-to-scroll box hurts
   most. Keep the touch-friendly narrower width, but let height follow the same full-viewport rule
   desktop already gets. */
/* Reported directly ("missing a closing x and when i open did come up squeezed" on an iPad): the
   440px cap below was ALSO reached by a full-size iPad ((hover:none) and (pointer:coarse) matches
   it regardless of screen size, same gotcha the comment above already called out for height) - at
   that width the header's title + 3 icon buttons no longer fit on one line, and with nothing to let
   the title shrink (see the min-width:0 fix on .contact-incubator-header strong below) the row
   overflowed and the rightmost button - Close - was clipped by the dialog's own overflow:hidden.
   A real phone still gets the cramped 440px width (second rule, narrower breakpoint, later in the
   cascade so it wins there); anything roomier than a phone - iPad included - now gets a width that
   comfortably fits the header. */
@media(max-width:1024px),(hover:none) and (pointer:coarse){.contact-incubator-dialog{width:min(760px,94vw)}}
@media(max-width:720px){.contact-incubator-dialog{width:min(440px,94vw)}}
@media(max-width:720px){.identity-logo-row{grid-template-columns:1fr}.identity-logo-preview{width:72px;height:72px}}

/* A.V.I.S Letter Creator */
/* Reported directly: "Move the icons back into a column as it is not good way the column should
   be maximum small." A prior pass put the Letter Creator (robot) and video conference launchers
   side by side in a row; back to stacked as a column, as they always were, but drawn smaller
   than the original column too, so the pair stays as compact as possible at the bottom of the
   left mail toolbox. */
/* Non-modal (.show(), never .showModal()): a real floating window, not a modal box - no
   ::backdrop, and the rest of the page stays interactive while it's open. */
/* Reported directly ("must always be full screen, not blocked by a header and the browser
   window... liberty for moving the window from screen corner to screen corner and resizable"):
   max-width/max-height used to stop a manual resize drag a few px short of the real screen edge
   (calc(100vw - 16px)/calc(100dvh - 16px)) - now the true 100vw/100dvh ceiling, so dragging the
   resize handle can reach every corner. Reported directly again ("Just make all windows full
   size... opens full screen size or I can drag it how I want"): the DEFAULT open width/height,
   previously capped at a fixed 1460x900px regardless of screen size, now matches that same full
   ceiling - a maximized launch the user can still freely drag/resize smaller afterward, the
   standard desktop convention. min-width/min-height stay as the floor a manual resize can't shrink
   past. */
.letter-creator-dialog{position:fixed;inset:0;z-index:95;width:calc(100vw - 28px);height:calc(100dvh - 28px);min-width:min(880px,calc(100vw - 28px));min-height:min(620px,calc(100dvh - 28px));max-width:100vw;max-height:100dvh;margin:auto;padding:0;overflow:hidden;border:1px solid #9f1831;border-radius:12px;background:#fff;box-shadow:0 32px 100px rgba(13,8,10,.46)}
.letter-creator-dialog.visual-keyboard{top:var(--letter-visual-top,0px)!important;bottom:auto!important;height:var(--letter-visual-height,100dvh)!important;max-height:var(--letter-visual-height,100dvh)!important;resize:none}.letter-creator-dialog.visual-keyboard .letter-ai-panel{padding-top:14px;padding-bottom:14px}
.letter-creator-shell{height:100%;display:grid;grid-template-columns:minmax(230px,270px) minmax(0,1fr) minmax(190px,210px);min-height:0}
.letter-ai-panel{min-width:0;min-height:0;padding:25px 20px;display:flex;flex-direction:column;overflow-y:auto;border-right:1px solid rgba(127,23,42,.22);background:#fff}
/* Reported directly as "drag has a block to the right side": the only draggable strip was
   .letter-window-header, which sits solely in the middle workspace column - grabbing from the left
   AI panel or the right template panel (each its own full-height sidebar with no header of its
   own) did nothing, reading as a dead zone. Both panels' own top strip is a drag handle now too. */
.letter-ai-brand{display:flex;flex-direction:column;gap:3px;color:var(--wine);cursor:grab;touch-action:none;user-select:none}.letter-ai-brand.dragging{cursor:grabbing}.letter-ai-brand strong{font-size:calc(24px * var(--avis-text, 1));letter-spacing:.22em}.letter-ai-brand small{font-size:calc(10px * var(--avis-text, 1));font-style:italic}
.letter-ai-panel>p{color:#5f585b;font-size:calc(12px * var(--avis-text, 1));line-height:1.55}
/* Phase 3: the manual recipient search/date fields and the prompt-box + "Ask A.V.I.S" button are
   gone - this is now AVI's own scrollback conversation, styled like an ordinary chat log rather
   than a form. Reported directly, with an annotated screenshot: never shown any more (see the
   `hidden` attribute on this section in index.html and its own comment there) now that the
   floating AVI widget drives the same conversation - kept only so submitLetterAviMessage's own
   already-working DOM writes still have somewhere real to land. */
.letter-avi-section{display:none}
.letter-avi-log{min-height:120px;max-height:clamp(180px,32vh,360px);padding:10px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;border:1px solid rgba(127,23,42,.22);border-radius:8px;background:var(--wine-soft)}
.letter-avi-message{max-width:92%;padding:7px 10px;border-radius:9px;font-size:calc(11px * var(--avis-text, 1));line-height:1.45;word-break:break-word;white-space:pre-wrap}
.letter-avi-message-avi{align-self:flex-start;background:#fff;color:var(--ink);border:1px solid rgba(127,23,42,.18)}
.letter-avi-message-user{align-self:flex-end;background:var(--wine);color:#fff}
.letter-avi-input-row{display:flex;align-items:center;gap:6px}
.letter-avi-input-row input{flex:1;min-width:0;min-height:36px;padding:0 10px;border:1px solid #ddd4d6;border-radius:6px;background:#fff;font:inherit;font-size:calc(12px * var(--avis-text, 1));color:var(--ink)}
.letter-avi-input-row input:disabled{opacity:.6}
.letter-avi-input-row #letterAviMic,.letter-avi-input-row #contactAviMic{width:36px;height:36px;padding:0;flex:0 0 auto;min-height:0;margin:0}
.letter-avi-input-row #letterAviMic svg,.letter-avi-input-row #contactAviMic svg{width:15px;height:15px}
.letter-avi-input-row button[type=submit]{flex:0 0 auto;min-height:36px;padding:0 14px;border:1px solid var(--wine);border-radius:6px;background:var(--wine);color:#fff;font-size:calc(11px * var(--avis-text, 1));font-weight:700;cursor:pointer}
.letter-avi-input-row button[type=submit]:disabled{opacity:.5;cursor:not-allowed}
.letter-voice-button{min-height:34px;border:1px solid rgba(127,23,42,.22);border-radius:7px;background:#fff;color:var(--wine-deep);font-size:calc(11px * var(--avis-text, 1));font-weight:650;width:100%;margin-top:10px;display:flex;align-items:center;justify-content:center;gap:7px}
.letter-voice-button svg{width:15px;height:15px}
.letter-voice-button:disabled{cursor:not-allowed;opacity:.5}
.letter-ai-status{font-size:calc(10px * var(--avis-text, 1))!important;text-align:center}
/* Under Signature and Stamp: A.V.I.S with an instruction and three presets, and the pictures of the
   AVISCloud repositories - a click places one, a drag places it where it is dropped. */
.letter-write-section,.letter-pictures-section{margin-top:16px;padding-top:14px;display:grid;gap:8px;border-top:1px solid var(--line)}
.letter-write-section h3,.letter-pictures-section h3{margin:0;color:var(--wine);font-size:calc(11px * var(--avis-text, 1));font-weight:800;letter-spacing:.14em}
.letter-write-section select,.letter-write-section textarea{width:100%;min-width:0;padding:7px 8px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink);font:inherit;font-size:calc(12px * var(--avis-text, 1))}
.letter-write-section textarea{min-height:76px;resize:vertical;line-height:1.4}
.letter-ai-run{padding:9px 12px;border:0;border-radius:6px;background:var(--wine);color:#fff;font-weight:700;font-size:calc(12px * var(--avis-text, 1));cursor:pointer}
.letter-write-section .letter-ai-status:empty{display:none}
/* Reported directly: "Remove the preview of images: the image picker should be only a access to AVISCloud or PC,
   o Images o Camera" - four sources, no pictures shown here. */
.letter-picture-sources{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.letter-picture-sources button,.letter-picture-sources label{display:grid;place-items:center;min-height:34px;padding:6px 8px;border:1px solid var(--wine);border-radius:6px;background:#fff;color:var(--wine);font:inherit;font-size:calc(12px * var(--avis-text, 1));font-weight:700;cursor:pointer;text-align:center}
.letter-picture-sources button:hover,.letter-picture-sources label:hover,.letter-picture-sources label:focus-within{background:var(--wine);color:#fff}.letter-ai-status.working{color:var(--wine)}.letter-ai-status.error{color:#a01530;font-weight:700}
.letter-signing-section{margin-top:16px;padding-top:16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;border-top:1px solid var(--line)}.letter-prep-action{min-width:0;padding:4px 1px;display:grid;grid-template-rows:44px auto auto;place-items:center;gap:3px;border:0;background:transparent;color:var(--ink);font-size:calc(9px * var(--avis-text, 1));line-height:1.15;text-align:center}.letter-prep-action strong{font-size:calc(9px * var(--avis-text, 1))}.letter-prep-action small{color:var(--muted);font-size:calc(8px * var(--avis-text, 1))}.letter-prep-action:is(:hover,:focus-visible){color:var(--wine);outline:1px solid rgba(127,23,42,.25);outline-offset:3px}.letter-upload-preview{position:relative;width:100%;height:44px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--wine);background:#fff;color:#c2b8bb;font-size:calc(10px * var(--avis-text, 1))}.letter-upload-preview img{position:absolute;inset:2px;width:calc(100% - 4px);height:calc(100% - 4px);object-fit:contain}.letter-upload-preview.has-image>span{display:none}.letter-qr-mark{position:relative;width:42px;height:42px;border:4px solid #171315;background:repeating-conic-gradient(#171315 0 25%,transparent 0 50%) 50%/8px 8px}.letter-qr-mark::after{content:"";position:absolute;inset:5px auto auto 5px;width:8px;height:8px;border:3px solid #fff;background:#171315;box-shadow:19px 0 0 -1px #171315,0 19px 0 -1px #171315}
/* Existing workspace behavior; unchanged by the AVISphare theme. */
.letter-workspace{min-width:0;min-height:0;display:grid;grid-template-rows:minmax(78px,auto) auto minmax(0,1fr);background:#efeded;box-shadow:inset 0 0 0 2px #b3122d}.letter-window-header{position:relative;padding:0 16px 0 20px;display:flex;flex-wrap:wrap;row-gap:4px;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid rgba(127,23,42,.24);background:#fff;box-shadow:0 6px 18px rgba(18,10,12,.08);cursor:grab;touch-action:none;user-select:none;z-index:2}.letter-window-header.dragging{cursor:grabbing}.letter-window-header>div,.letter-window-identity{display:flex;align-items:center;gap:8px;min-width:0}.letter-window-identity>img{width:32px;height:38px;flex:0 0 auto;object-fit:contain}.letter-window-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px}.letter-window-header span{display:flex;flex-direction:column;gap:2px}.letter-window-header strong{font-size:calc(13px * var(--avis-text, 1))}.letter-window-header small{color:var(--muted);font-size:calc(10px * var(--avis-text, 1))}
.letter-window-icon-button{width:44px;height:44px;padding:0;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;cursor:pointer}.letter-window-icon-button:hover{color:var(--wine)}.letter-window-icon-button svg{width:28px;height:28px;color:#a60505}.letter-window-icon-button-labeled{width:auto;min-width:48px;height:60px;padding:4px 6px;grid-template-rows:30px auto;gap:2px;color:#a60505;font-size:calc(7px * var(--avis-text, 1));font-weight:700;line-height:1.1;text-align:center}.letter-window-icon{width:28px;height:28px;display:block;background-color:#a60505;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}.letter-window-icon-save{-webkit-mask-image:url(/letter-handling/save.png?rev=1);mask-image:url(/letter-handling/save.png?rev=1)}.letter-window-icon-save-as{-webkit-mask-image:url(/letter-handling/save-as.png?rev=1);mask-image:url(/letter-handling/save-as.png?rev=1)}.letter-window-icon-delete{-webkit-mask-image:url(/letter-handling/delete.png?rev=1);mask-image:url(/letter-handling/delete.png?rev=1)}.letter-window-icon-print{-webkit-mask-image:url(/letter-handling/print.png?rev=1);mask-image:url(/letter-handling/print.png?rev=1)}.letter-window-icon-back{-webkit-mask-image:url(/letter-handling/back.png?rev=1);mask-image:url(/letter-handling/back.png?rev=1)}.letter-window-icon-contact{-webkit-mask-image:url(/letter-handling/contact.png?rev=1);mask-image:url(/letter-handling/contact.png?rev=1)}.letter-window-icon-svg{background-color:transparent;display:grid;place-items:center}
/* Existing workspace behavior; unchanged by the AVISphare theme. */
.letter-contact-picker-anchor{position:static}
.letter-contact-picker{position:absolute;z-index:40;top:calc(100% + 6px);left:16px;right:16px;width:auto;max-height:320px;overflow:auto;padding:8px;border:1px solid #d8cfd1;border-radius:8px;background:#fff;box-shadow:0 12px 28px rgba(24,15,18,.2)}
.letter-contact-picker[hidden]{display:none}
.letter-contact-picker input{box-sizing:border-box;width:100%;padding:8px 10px;border:1px solid #d8cfd1;border-radius:5px;font:calc(12px * var(--avis-text, 1))/1.3 var(--font-ui);margin-bottom:6px}
.letter-contact-picker-results{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.letter-contact-picker-results button{width:100%;display:grid;gap:2px;padding:8px 10px;border:0;border-radius:5px;background:#fff;color:var(--ink);text-align:left;cursor:pointer}
.letter-contact-picker-results button:is(:hover,:focus-visible){background:var(--wine-soft);outline:0}
.letter-contact-picker-results strong{font-size:calc(12px * var(--avis-text, 1))}
.letter-contact-picker-results small{display:block;color:var(--muted);font-size:calc(10px * var(--avis-text, 1))}
.letter-contact-picker-empty{color:var(--muted);font-size:calc(11px * var(--avis-text, 1));padding:8px 4px}
.letter-format-toolbar{min-height:44px;padding:6px 12px;display:flex;flex-wrap:wrap;align-items:center;gap:5px;border-bottom:1px solid #d9d3d5;background:#fff;box-shadow:0 4px 12px rgba(18,10,12,.05);z-index:1}.letter-format-toolbar select,.letter-format-toolbar button{height:30px;flex:0 0 auto;padding:4px 8px;border:1px solid var(--line);border-radius:5px;background:#fff;color:var(--ink);font-size:calc(10px * var(--avis-text, 1))}.letter-format-toolbar select:first-child{width:132px}.letter-format-toolbar select:nth-child(2){width:68px}.letter-format-toolbar select:nth-child(3){width:64px}.letter-format-toolbar button{width:30px;padding:4px;display:grid;place-items:center}.letter-format-toolbar button svg{width:15px;height:15px}.letter-format-toolbar input[type=color]{width:31px;height:30px;flex:0 0 auto;padding:2px;border:1px solid var(--line);border-radius:5px;background:#fff}.letter-toolbar-divider{width:1px;height:20px;flex:0 0 auto;margin:0 2px;background:var(--line)}
.letter-canvas{min-height:0;padding:24px;overflow:auto;display:grid;justify-items:center;align-items:start;gap:24px;zoom:var(--letter-zoom,1)}.letter-canvas.letter-canvas-wide{grid-template-columns:repeat(auto-fit,minmax(min(720px,100%),max-content));justify-content:center}.letter-zoom-control{display:flex;align-items:center;gap:3px}.letter-zoom-control select{width:64px}.letter-page{position:relative;width:720px;aspect-ratio:1190/1684;background:#fff;box-shadow:0 16px 42px rgba(18,10,12,.2)}.letterhead-template{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:contain;pointer-events:none;user-select:none}.letter-page-body{position:absolute;z-index:1;inset:5% 7.7% 5%;overflow:hidden;outline:0;color:#272326;background:transparent;font:11pt/1.15 Aptos,"Segoe UI",sans-serif;text-align:justify}.letter-page-body p{margin:0 0 1em}.letter-page-body ul,.letter-page-body ol{padding-left:1.5em}
.letter-template-panel{min-width:0;padding:20px 15px;overflow-y:auto;border-left:1px solid rgba(127,23,42,.22);background:#fff}.letter-template-panel>header{display:flex;flex-direction:column;gap:3px;margin-bottom:15px;cursor:grab;touch-action:none;user-select:none}.letter-template-panel>header.dragging{cursor:grabbing}.letter-template-panel>header strong{font-size:calc(18px * var(--avis-text, 1));text-transform:uppercase}.letter-template-panel>header small{color:var(--muted);font-size:calc(10px * var(--avis-text, 1))}.letter-document-name{display:grid;gap:4px;margin-bottom:14px;color:var(--muted);font-size:calc(9px * var(--avis-text, 1));font-weight:700;text-transform:uppercase}.letter-document-name input{width:100%;padding:8px;border:1px solid #cfc5c8;border-radius:5px;background:#fff;color:var(--ink);font:calc(12px * var(--avis-text, 1))/1.2 inherit;text-transform:none}.letter-template-add{width:100%;margin-top:14px;min-height:30px;padding:6px;border:1px solid #bdaeb2;border-radius:5px;background:var(--wine);color:#fff;font:700 calc(9px * var(--avis-text, 1))/1 inherit;cursor:pointer;border-color:var(--wine)}.letter-template-status{min-height:28px;margin:10px 0 0;color:var(--muted);font-size:calc(9px * var(--avis-text, 1));line-height:1.35}
.letter-postoffice{min-width:0;margin-left:auto;display:flex;align-items:center;gap:9px}.letter-postoffice>strong{color:var(--ink);font-size:calc(11px * var(--avis-text, 1));text-transform:uppercase}.letter-postoffice-tools{display:grid;grid-template-columns:repeat(4,46px);gap:4px}.letter-postoffice-action{position:relative;width:46px;height:62px;padding:4px 2px;display:grid;grid-template-rows:38px auto;place-items:center;gap:2px;border:0;border-radius:0;background:transparent;color:var(--wine-deep);font-size:calc(7px * var(--avis-text, 1));font-weight:700;line-height:1;text-align:center;cursor:pointer}.letter-postoffice-icon{width:42px;height:38px;display:block;background-color:#a60505;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}.letter-postoffice-icon-2nd-signature{-webkit-mask-image:url(/letter-handling/second-signature.png?rev=1);mask-image:url(/letter-handling/second-signature.png?rev=1)}.letter-postoffice-icon-email{-webkit-mask-image:url(/letter-handling/email.png?rev=1);mask-image:url(/letter-handling/email.png?rev=1)}.letter-postoffice-icon-signal{-webkit-mask-image:url(/letter-handling/signal.png?rev=1);mask-image:url(/letter-handling/signal.png?rev=1)}.letter-postoffice-icon-whatsapp{-webkit-mask-image:url(/letter-handling/whatsapp.png?rev=1);mask-image:url(/letter-handling/whatsapp.png?rev=1)}.letter-postoffice-select{cursor:pointer}.letter-postoffice-select select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.letter-postoffice-action:is(:hover,:focus-visible){outline:0}.letter-postoffice-action:active .letter-postoffice-icon{background-color:rgb(35,97,99)}.letter-postoffice-action:active span:not(.letter-postoffice-icon){color:rgb(35,97,99)}
.letter-resource-dialog{width:min(880px,calc(100vw - 28px));max-width:880px;max-height:min(720px,calc(100dvh - 28px));padding:0;overflow:hidden;border:1px solid var(--wine);border-radius:10px;background:#fff;box-shadow:0 28px 80px rgba(13,8,10,.42)}.letter-resource-dialog::backdrop{background:transparent;backdrop-filter:none}.letter-resource-shell{height:min(660px,calc(100dvh - 40px));display:grid;grid-template-rows:62px minmax(0,1fr) auto}.letter-resource-shell>header,.letter-resource-shell>footer{padding:12px 18px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line)}.letter-resource-shell>header>div{display:grid;gap:2px}.letter-resource-shell>header small,.letter-resource-shell>footer>span{color:var(--muted);font-size:calc(10px * var(--avis-text, 1))}.letter-resource-shell>footer{border-top:1px solid var(--line);border-bottom:0}.letter-resource-body{min-height:0;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) 300px}.letter-resource-browser{min-width:0;min-height:0;height:100%;padding:16px;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px;border-right:1px solid var(--line)}.letter-resource-browser label,.letter-qr-body label{display:grid;gap:6px;color:var(--ink);font-size:calc(11px * var(--avis-text, 1));font-weight:700}.letter-resource-browser input,.letter-qr-body textarea{width:100%;padding:10px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink);font:inherit}.letter-asset-list{min-height:0;overflow-y:auto;display:grid;align-content:start;gap:7px}.letter-asset-option{width:100%;min-width:0;padding:7px;display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:10px;border:1px solid var(--line);border-radius:6px;background:#fff;text-align:left}.letter-asset-option[aria-selected=true]{border-color:var(--wine);background:var(--wine-soft)}.letter-asset-option img{width:58px;height:44px;object-fit:contain;background:#fff}.letter-asset-option span{min-width:0;display:grid;gap:3px}.letter-asset-option strong,.letter-asset-option small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.letter-asset-option strong{font-size:calc(11px * var(--avis-text, 1))}.letter-asset-option small{color:var(--muted);font-size:calc(9px * var(--avis-text, 1))}.letter-resource-preview{min-width:0;padding:16px;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px}.letter-red-preview{min-height:220px;display:grid;place-items:center;padding:14px;overflow:hidden;border:2px solid var(--wine);border-radius:7px;background:#fff;color:var(--muted);font-size:calc(11px * var(--avis-text, 1));line-height:1.4;text-align:center}.letter-red-preview img{max-width:100%;max-height:100%;object-fit:contain}.letter-resource-preview p,.letter-qr-body p{margin:0;color:var(--muted);font-size:calc(10px * var(--avis-text, 1))}.letter-qr-body{min-height:0;padding:22px;display:grid;grid-template-columns:minmax(260px,1fr) auto 300px;grid-template-rows:auto auto;align-items:start;gap:14px;overflow:auto}.letter-qr-body .letter-red-preview{grid-column:3;grid-row:1/-1;min-height:300px}.letter-qr-body>p{grid-column:1/3}.letter-qr-body .secondary-button{align-self:end}.letter-qr-actions{display:grid;gap:8px;align-self:end}.letter-qr-preview img{cursor:pointer}.letter-footer-certification img[src]{cursor:pointer}.letter-qr-preview img{width:min(100%,260px);aspect-ratio:1;object-fit:contain}
@media(max-width:1180px) and (min-width:1025px){.letter-creator-shell{grid-template-columns:230px minmax(0,1fr) 190px}.letter-ai-panel{padding:20px 16px}.letter-canvas{padding:18px}.letter-postoffice>strong{display:none}.letter-postoffice-tools{grid-template-columns:repeat(4,42px)}.letter-postoffice-action{width:42px}}
@media(max-width:1024px),(hover:none) and (pointer:coarse){.letter-creator-dialog{width:min(880px,94vw);height:min(720px,92dvh);min-width:0;min-height:0;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.letter-creator-shell{grid-template-columns:220px minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}.letter-template-panel{grid-column:1/-1;min-height:116px;max-height:148px;padding:12px 16px;display:flex;align-items:center;gap:8px;overflow-x:auto;border-top:1px solid var(--line);border-left:0}.letter-template-panel>header{min-width:110px;margin:0}.letter-postoffice>strong{display:none}.letter-postoffice-tools{grid-template-columns:repeat(4,40px)}.letter-postoffice-action{width:40px}.letter-resource-dialog{width:calc(100vw - 20px)}
  /* Codex review finding (P2) had the same root cause here as the ≤560px case its own comment
     describes: adding Undo A.V.I.S made .letter-window-actions a 7th button in a row already
     tight at 6 - verified by rendering the real dialog across this whole 561-1024px range and
     measuring the Close button's box against the dialog's own, which found it clipped outside the
     dialog at every width tested in that range, not just the narrower one Codex called out. The
     postoffice buttons already go icon-only here (see .letter-postoffice-action above, unchanged);
     the toolbar buttons now do too, the same compact treatment the ≤560px breakpoint already
     gives them. */
  .letter-window-icon-button-labeled{width:44px;min-width:44px;height:44px;padding:0}
  .letter-window-icon-button-labeled span:not(.letter-window-icon){display:none}
}
@media(max-width:720px){.letter-creator-shell{display:flex;flex-direction:column;overflow-y:auto}.letter-ai-panel{flex:0 0 auto;overflow:visible;border:0;border-bottom:1px solid var(--line)}.letter-signing-section{margin-top:18px}.letter-workspace{flex:0 0 auto;min-height:700px}.letter-template-panel{flex:0 0 auto;min-height:126px;max-height:none;overflow-x:auto;border-bottom:1px solid var(--line)}.letter-format-toolbar{position:sticky;top:0}.letter-resource-dialog{inset:0;width:100vw;max-width:none;max-height:none;margin:0;border-radius:0}.letter-resource-shell{height:100dvh}.letter-resource-body{grid-template-columns:1fr;overflow-y:auto}.letter-resource-browser{min-height:330px;border-right:0;border-bottom:1px solid var(--line)}.letter-resource-preview{min-height:300px}.letter-qr-body{grid-template-columns:1fr;grid-template-rows:auto auto auto auto}.letter-qr-body .letter-red-preview{grid-column:1;grid-row:auto;min-height:260px}.letter-qr-body>p{grid-column:1}.letter-resource-shell>footer>span{display:none}}
/* Codex review finding (P2): adding Undo A.V.I.S made .letter-window-actions a 7th unwrapped
   44px-wide button in a row that used to fit 6 - on a ~450-480px screen the row ran past the
   header's own available width and, since the dialog clips overflow, pushed Full size/Close
   entirely outside the visible dialog with no way to reach them. .letter-window-actions now gets
   its own full-width row (wrapping too, as a second line of defence) instead of sharing row 1
   with the identity block, so it has the whole header width to lay 7 buttons out in - verified by
   rendering the real dialog at 460px and measuring the Close button's box against the dialog's own
   (it used to sit past the dialog's right edge entirely; it doesn't any more). */
/* Codex review finding (P2): the manual Contact icon's own 561-1024px fix (above) left this
   narrower, more specific ≤560px breakpoint untouched - it still pinned .letter-workspace's header
   row to a literal 146px, sized for exactly 7 icon-only actions on one wrapped line. The 8th action
   this PR adds wraps to a second line here too, and a fixed 146px can't grow to fit it, so the
   identity/actions/postoffice rows below started overlapping. minmax(146px,auto) lets the row grow
   past its 146px floor instead of clipping, the same fix already applied to the 561-1024px range. */
@media(max-width:560px){.letter-workspace{grid-template-rows:minmax(146px,auto) auto minmax(0,1fr)}.letter-window-header{min-height:146px;padding:6px 9px;display:grid;grid-template-columns:1fr;grid-template-rows:auto auto auto;row-gap:6px}.letter-window-identity{grid-column:1;grid-row:1}.letter-postoffice{grid-column:1;grid-row:3;margin:0}.letter-postoffice-tools{width:100%;grid-template-columns:repeat(4,minmax(0,1fr))}.letter-postoffice-action{width:100%;height:44px;grid-template-rows:30px}.letter-postoffice-action .letter-postoffice-icon{width:38px;height:30px}.letter-postoffice-action span:not(.letter-postoffice-icon){display:none}.letter-window-actions{grid-column:1;grid-row:2;flex-wrap:wrap;justify-content:flex-end}.letter-window-icon-button-labeled{width:44px;height:44px;padding:0;grid-template-rows:unset}.letter-window-icon-button-labeled span:not(.letter-window-icon){display:none}.letter-canvas{padding:12px}.letter-workspace{min-height:680px}.letter-template-panel{padding:10px}.letter-template-panel>header{min-width:92px}}
@media print{body>:not(#letterCreatorDialog){display:none!important}#letterCreatorDialog{position:static;width:auto;height:auto;display:block;border:0;box-shadow:none}#letterCreatorDialog :is(.letter-ai-panel,.letter-template-panel,.letter-window-header,.letter-format-toolbar){display:none}#letterCreatorDialog :is(.letter-creator-shell,.letter-workspace,.letter-canvas){display:block;padding:0;background:#fff}#letterCreatorDialog .letter-page{width:210mm;height:297mm;border:0;box-shadow:none}}


/* Letter resource dialogs and certified distribution */
.letter-resource-dialog{position:fixed;inset:0;width:min(940px,calc(100vw - 28px));height:min(620px,calc(100dvh - 28px));min-width:min(560px,calc(100vw - 20px));min-height:min(420px,calc(100dvh - 20px));max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px);margin:auto;resize:none}
.letter-resource-dialog.letter-qr-dialog{width:min(780px,calc(100vw - 28px));height:min(460px,calc(100dvh - 28px))}
.letter-resource-shell{height:100%;min-height:0}
.letter-resource-shell>header{cursor:move;touch-action:none;user-select:none}
.letter-resource-shell>header.dragging{cursor:grabbing}
.letter-resource-body{grid-template-columns:minmax(0,1fr) minmax(280px,320px)}
.letter-resource-preview{grid-template-rows:auto auto auto;align-content:start}
.letter-red-preview{width:100%;min-height:0;aspect-ratio:1;align-self:start}
.letter-qr-body{padding:18px;grid-template-columns:minmax(0,1fr) 130px 260px;grid-template-rows:auto auto;align-items:start;gap:12px}
.letter-qr-body textarea{min-height:148px;resize:none;font:calc(10px * var(--avis-text, 1))/1.35 ui-monospace,SFMono-Regular,Consolas,monospace}
.letter-qr-body .letter-red-preview{grid-column:3;grid-row:1/-1;width:260px;min-height:0;aspect-ratio:1}
.letter-qr-body>p{grid-column:1/3}
.letter-footer-certification{position:absolute;z-index:2;right:1cm;bottom:1cm;width:54px;height:54px;display:block;color:#342e31;font-size:calc(6px * var(--avis-text, 1));line-height:1;text-transform:uppercase;letter-spacing:0}
.letter-footer-certification[hidden]{display:none}
.letter-footer-certification img{display:block;width:54px;height:54px;object-fit:contain;background:#fff}.letter-footer-certification small{position:absolute;right:0;bottom:calc(100% + 2px);width:70px;text-align:right}
.letter-recipient-picker-body{padding:22px;display:grid;gap:16px;align-content:start}
.letter-recipient-picker-body label{display:grid;gap:6px;color:var(--ink);font-size:calc(11px * var(--avis-text, 1));font-weight:700}
.letter-recipient-picker-body select{width:100%;padding:10px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink);font:inherit}
.letter-recipient-picker-body p{margin:0;color:var(--muted);font-size:calc(11px * var(--avis-text, 1))}
.letter-footer-reference{position:absolute;z-index:2;left:1cm;bottom:5mm;color:#342e31;font-size:calc(8px * var(--avis-text, 1));font-weight:700;letter-spacing:.02em}
.letter-footer-reference[hidden]{display:none}

/* Same edge-to-edge resize ceiling as .letter-creator-dialog and .contact-incubator-dialog above -
   max-height alone used to stop a manual resize short of the real bottom edge. */
.letter-gallery-dialog{position:fixed;inset:0;z-index:95;width:min(760px,calc(100vw - 28px));height:min(700px,calc(100dvh - 28px));max-height:100dvh;margin:auto;padding:14px 20px 16px;grid-template-rows:auto auto minmax(0,1fr);gap:8px;overflow:hidden;border:1px solid #9f1831;border-radius:12px;background:#fff;box-shadow:0 32px 100px rgba(13,8,10,.46);box-sizing:border-box}
/* display must only ever apply while [open] - every other dialog in this file leaves display
   alone entirely and relies on the UA stylesheet's dialog:not([open]){display:none}, because an
   unconditional author-origin display declaration on the <dialog> element itself beats that UA
   rule regardless of specificity. Setting display:grid unscoped here meant the gallery rendered
   fully visible at all times, even freshly closed or never shown - "closing" it (removing [open])
   had no visual effect at all, which is exactly what was reported as "the X isn't working". */
.letter-gallery-dialog[open]{display:grid}
.letter-gallery-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-16px -20px 0;padding:14px 18px;border-bottom:1px solid rgba(127,23,42,.24);cursor:grab;touch-action:none;user-select:none}
.letter-gallery-header.dragging{cursor:grabbing}
.letter-gallery-header>div{display:flex;align-items:center;gap:10px}
.letter-gallery-header img{width:30px;height:36px;object-fit:contain}
.letter-gallery-header span{display:flex;flex-direction:column;gap:2px}
.letter-gallery-header strong{font-size:calc(14px * var(--avis-text, 1))}
.letter-gallery-header small{color:var(--muted);font-size:calc(10px * var(--avis-text, 1))}
/* The grid scrolls to hold the server's full quota of templates instead of paginating - no
   separate footer, no page count, just scroll up and down like any other list. */
.letter-gallery-grid{min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-content:start}
/* One border, no nested frame around the action row inside it - the icon buttons carry no border
   of their own (see .letter-template-icons .icon-button below) until hovered. A light border-color
   change is the only "selected" signal; no background wash on hover, which used to read as a stray
   pink box sitting over the card underneath it. */
.letter-gallery-grid .letter-template-row{position:relative;padding:10px;display:grid;justify-items:center;gap:6px;border:1px solid var(--line);border-radius:8px;text-align:center;cursor:pointer}
.letter-gallery-grid .letter-template-row:hover{border-color:rgba(127,23,42,.35)}
.letter-gallery-grid .letter-template-row.active{border-color:var(--wine)}
.letter-gallery-grid .letter-template-sheet{width:140px;height:198px;aspect-ratio:1190/1684;display:flex;flex-direction:column;gap:10px;padding:13px 11px;border:0;background:#fff center/cover no-repeat;box-shadow:0 5px 12px rgba(20,11,13,.12)}
.letter-gallery-grid .letter-template-row[data-template-row=corporate] .letter-template-sheet{background:url("/letterhead-template.png?rev=47aa5fec6af3") center/contain no-repeat}
.letter-gallery-grid .letter-template-sheet i{height:2px;display:block;background:#d8d2d3}
.letter-gallery-grid .letter-template-row[data-template-row=corporate] .letter-template-sheet i{visibility:hidden}
.letter-gallery-grid .letter-template-sheet i:nth-child(2){width:72%}
.letter-gallery-grid .letter-template-sheet.preview-unavailable{display:grid;place-items:center;background-image:none!important}
.letter-gallery-grid .letter-template-sheet.preview-unavailable::after{content:"Preview unavailable";padding:0 10px;color:var(--muted);font-size:calc(9px * var(--avis-text, 1));font-weight:700;text-align:center}
.letter-gallery-grid .letter-template-sheet.preview-unavailable i{display:none}
.letter-gallery-grid .letter-template-name{width:100%;max-width:220px;padding:5px 6px;overflow:hidden;border:1px solid transparent;border-radius:5px;background:transparent;color:#242022;font:700 calc(11px * var(--avis-text, 1))/1.3 inherit;text-align:center;text-overflow:ellipsis;white-space:nowrap}
.letter-gallery-grid .letter-template-name:hover,.letter-gallery-grid .letter-template-name:focus{border-color:#cfc5c8;background:#fff}
.letter-gallery-grid .letter-template-meta{color:var(--muted);font-size:calc(8px * var(--avis-text, 1))}
.letter-gallery-grid .letter-template-icons{display:flex;align-items:center;gap:4px}
.letter-gallery-grid .letter-template-icons .icon-button{width:28px;height:28px;border:0;border-radius:6px;background:transparent;color:var(--wine-deep)}
.letter-gallery-grid .letter-template-icons .icon-button:hover{color:var(--wine)}
.letter-gallery-grid .letter-template-icons .icon-button svg{width:15px;height:15px}
.letter-gallery-grid .letter-template-icons .icon-button.active{color:var(--wine)}
.letter-gallery-grid .letter-template-icons .icon-button:disabled{cursor:default}
.letter-gallery-grid .letter-template-icons .icon-button.letter-template-delete:hover{color:#a01530;background:#fdecee}
.letter-gallery-grid .letter-template-icons label.icon-button input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.letter-template-add-tile{width:100%;min-height:198px;display:grid;place-items:center;gap:6px;padding:10px;border:1px dashed #cfc5c8;border-radius:8px;background:transparent;color:var(--wine-deep);font-size:calc(11px * var(--avis-text, 1));font-weight:700;cursor:pointer}
.letter-template-add-tile:hover{border-color:var(--wine);background:var(--wine-soft)}
.letter-template-add-tile svg{width:22px;height:22px}
@media(max-width:560px){.letter-gallery-dialog{inset:0!important;width:100vw!important;height:100dvh!important;max-width:none;max-height:none;margin:0!important;border-radius:0}.letter-gallery-grid{grid-template-columns:1fr}}
@media(max-width:720px){
  .letter-resource-dialog,.letter-resource-dialog.letter-qr-dialog{inset:0!important;width:100vw!important;height:100dvh!important;min-width:0;min-height:0;max-width:none;max-height:none;margin:0!important}
  .letter-resource-dialog .dialog-resize-handle{display:none}
  .letter-resource-shell>header{cursor:default;touch-action:auto}
  .letter-red-preview{width:min(100%,320px);margin-inline:auto}
  .letter-qr-body .letter-red-preview{width:min(100%,280px);min-height:0}
}

/* Editable signing assets and final PDF distribution. */
.letter-local-file-button{padding:10px 12px;display:flex!important;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--wine);border-radius:6px;background:var(--wine-soft);cursor:pointer}.letter-local-file-button span{color:var(--wine);font-weight:800}.letter-local-file-button small{color:var(--muted);font-size:calc(9px * var(--avis-text, 1));font-weight:500}.letter-placed-asset{position:relative;z-index:2;display:block;min-width:48px;max-width:100%;padding:0;border:0;cursor:move;touch-action:none;user-select:none}.letter-placed-asset:focus{outline:0}.letter-placed-asset img{width:100%;height:auto;display:block;pointer-events:none}.letter-asset-controls{position:absolute;inset:0;pointer-events:none}/* Reported directly ("You see these handles on the image corners must disappear"): matches
   .dialog-resize-handle's own unmarked treatment - the hit area (position/size/cursor) stays, only
   the visible wine-coloured square marker is removed. */
.letter-asset-resize{position:absolute;right:-8px;bottom:-8px;width:24px;height:24px;cursor:nwse-resize;touch-action:none}@media(pointer:coarse){.letter-asset-resize{right:-14px;bottom:-14px;width:36px;height:36px}}.letter-pdf-dialog{width:min(1040px,calc(100vw - 28px));height:min(820px,calc(100dvh - 28px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);margin:auto;padding:0;overflow:hidden;border:1px solid var(--wine);border-radius:10px;background:#fff;box-shadow:0 28px 80px rgba(13,8,10,.42)}.letter-pdf-dialog::backdrop{background:transparent;backdrop-filter:none}.letter-pdf-shell{height:100%;display:grid;grid-template-rows:62px minmax(0,1fr) auto auto}.letter-pdf-shell>header,.letter-pdf-shell>footer{padding:12px 18px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line)}.letter-pdf-shell>header>div{display:grid;gap:2px}.letter-pdf-shell>header small{color:var(--muted);font-size:calc(10px * var(--avis-text, 1))}.letter-pdf-preview{min-height:0;padding:14px;background:#e9e7e8}.letter-pdf-preview iframe{width:100%;height:100%;border:1px solid var(--line);background:#fff}.letter-pdf-status{margin:0;padding:9px 18px;color:var(--muted);font-size:calc(10px * var(--avis-text, 1));border-top:1px solid var(--line)}.letter-pdf-shell>footer{justify-content:flex-end;flex-wrap:wrap;border-top:1px solid var(--line);border-bottom:0}
@media(max-width:720px){.letter-pdf-dialog{inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border-radius:0}.letter-pdf-shell>footer{display:grid;grid-template-columns:1fr 1fr}.letter-pdf-shell>footer button{min-width:0}.letter-local-file-button{align-items:flex-start;flex-direction:column}}

.letter-page>.letter-placed-asset{position:absolute;inset:auto;z-index:4;margin:0;max-width:100%}
.letter-page>.letter-placed-asset[data-wrap=behind]{z-index:0}

/* AVISCloud / Local PC signing asset finder. */
.letter-resource-browser{grid-template-rows:auto auto auto minmax(0,1fr)}
.letter-asset-source-selector{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--wine);border-radius:6px;overflow:hidden}
.letter-asset-source-selector.has-draw{grid-template-columns:1fr 1fr 1fr}
.letter-asset-source-selector button{min-height:38px;border:0;border-right:1px solid var(--wine);background:#fff;color:var(--wine);font:700 calc(11px * var(--avis-text, 1))/1 var(--font-ui)}
.letter-asset-source-selector button:last-child{border-right:0}
.letter-asset-source-selector button[aria-selected=true]{background:var(--wine);color:#fff}
.letter-local-asset-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.letter-local-asset-controls[hidden]{display:none}
.letter-local-asset-controls .letter-local-file-button{min-width:0;min-height:48px;padding:8px 10px;align-items:flex-start;flex-direction:column;justify-content:center}
.letter-asset-draw{display:grid;gap:8px}
.letter-asset-draw[hidden]{display:none}
.letter-asset-draw canvas{width:100%;height:140px;border:1px solid var(--wine);border-radius:6px;background:#fff;cursor:crosshair;touch-action:none}
.letter-asset-draw-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.letter-asset-draw-actions button{min-height:38px;border:1px solid var(--wine);border-radius:6px;background:#fff;color:var(--wine);font:700 calc(11px * var(--avis-text, 1))/1 var(--font-ui);cursor:pointer}
.letter-asset-draw-actions button:last-child{background:var(--wine);color:#fff}
.letter-asset-list{grid-row:4;height:100%;max-height:100%;overflow-y:scroll;-webkit-overflow-scrolling:touch;touch-action:pan-y pinch-zoom;overscroll-behavior:contain;scrollbar-gutter:stable}
.letter-asset-more{width:100%;min-height:38px;margin:0;padding:10px;border:1px solid var(--wine);border-radius:6px;background:#fff;color:var(--wine);font:700 calc(10px * var(--avis-text, 1))/1.2 var(--font-ui);text-align:center}
@media(max-width:720px){.letter-local-asset-controls{grid-template-columns:1fr}.letter-resource-body{grid-template-rows:minmax(0,1fr);overflow:hidden}.letter-resource-browser{min-height:0;grid-template-rows:auto auto auto minmax(0,1fr)}.letter-resource-preview{display:none}}
.contact-import-review-dialog{width:min(560px,calc(100vw - 30px));max-height:calc(100vh - 30px);padding:0;border:1px solid rgba(127,23,42,.3);border-radius:14px;overflow:hidden}.contact-import-review-dialog::backdrop{background:transparent;backdrop-filter:none}.contact-import-review-shell{display:flex;flex-direction:column;max-height:calc(100vh - 30px)}.contact-import-review-shell>header{padding:15px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.contact-import-review-shell>header strong{font-size:calc(13px * var(--avis-text, 1))}.contact-import-review-body{padding:16px 20px;overflow-y:auto;display:grid;gap:14px}.contact-import-review-body>p#contactImportReviewSummary{margin:0;color:var(--ink);font-size:calc(12px * var(--avis-text, 1));line-height:1.5}.contact-import-review-group{display:grid;gap:6px}.contact-import-review-group strong{font-size:calc(11px * var(--avis-text, 1));color:var(--wine-deep)}.contact-import-review-group ul{margin:0;padding:0;list-style:none;display:grid;gap:2px;max-height:120px;overflow-y:auto}.contact-import-review-group li{padding:4px 8px;border-radius:5px;background:var(--wine-soft);font-size:calc(11px * var(--avis-text, 1));color:var(--ink)}.contact-import-review-group p.small{margin:0;color:var(--muted);font-size:calc(10px * var(--avis-text, 1))}.contact-import-review-group label{display:flex;align-items:center;gap:7px;font-size:calc(11px * var(--avis-text, 1));color:var(--ink)}.contact-import-review-shell>footer{padding:14px 20px;display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line)}
.contact-sync-consent-dialog{width:min(420px,calc(100vw - 30px));padding:0;border:1px solid rgba(127,23,42,.3);border-radius:14px;background:#fff;box-shadow:0 30px 90px rgba(43,16,22,.3)}.contact-sync-consent-dialog::backdrop{background:transparent;backdrop-filter:none}.contact-sync-consent-shell{display:flex;flex-direction:column;gap:16px;padding:22px 20px}.contact-sync-consent-shell>p{margin:0;color:var(--ink);font-size:calc(13px * var(--avis-text, 1));line-height:1.55}.contact-sync-consent-shell>footer{display:flex;justify-content:flex-end;gap:10px}

/* Contact editor: name + @domain + Activate, and a green/red light per address. */
.contact-editor-link-label{display:block;margin-bottom:6px;font-size:calc(11px * var(--avis-text, 1));font-weight:700;color:var(--wine-deep)}
.contact-editor-link-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto;align-items:center;gap:8px}
.contact-editor-link-row input,.contact-editor-link-row select{width:100%;min-width:0;padding:9px 10px;border:1px solid var(--line);border-radius:6px;background:#fff;font:inherit;font-size:calc(12px * var(--avis-text, 1))}
.contact-editor-link-at{font-weight:700;color:var(--muted)}
.contact-editor-linked-list li{gap:10px}
.alias-light{flex:none;width:12px;height:12px;border-radius:50%;box-shadow:0 0 0 3px rgba(0,0,0,.05)}
.alias-light-ok{background:#1c7a3b}
.alias-light-off{background:#a01530}
.alias-text{display:grid;gap:2px;min-width:0;flex:1}
.alias-text strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
.alias-text small{color:var(--muted);font-size:calc(11px * var(--avis-text, 1))}
@media (max-width:520px){.contact-editor-link-row{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.contact-editor-link-row button{grid-column:1/-1}}
.own-email-row{margin-top:8px;display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) auto;align-items:center;gap:8px}
.own-email-row input,.own-email-servers :is(input,select){width:100%;min-width:0;padding:9px 10px;border:1px solid var(--line);border-radius:6px;background:#fff;font:inherit;font-size:calc(12px * var(--avis-text, 1))}
.own-email-servers{margin-top:8px}.own-email-servers label[hidden]{display:none}
/* Reported directly, with Apple's Add Account sheet: "only small popup windows the is ok" - + Add account's small window: the
   providers as one white list, then the boxes of the one chosen, one under the other; the title stays centred. */
.add-account-dialog{width:min(380px,calc(100vw - 30px));max-height:calc(100dvh - 30px);overflow:auto;padding:0;border:1px solid rgba(127,23,42,.3);border-radius:14px;background:#f2f2f7;box-shadow:0 30px 90px rgba(43,16,22,.3)}.add-account-dialog::backdrop{background:transparent}
.add-account-shell{display:flex;flex-direction:column;gap:10px;padding:12px 14px 16px}.add-account-shell>header{display:grid;grid-template-columns:36px 1fr 36px;align-items:center}.add-account-shell>header h2{grid-column:2;margin:0;text-align:center;font-size:calc(17px * var(--avis-text, 1))}.add-account-shell>header [data-own=close]{grid-column:3}



.add-account-provider{width:100%;min-height:46px;padding:0 12px;border:1px solid #d9d9df;border-radius:10px;background:#fff;color:inherit;font:inherit;font-size:calc(16px * var(--avis-text, 1))}.add-account-shell .own-email-row{grid-template-columns:1fr}.add-account-activate{justify-content:center;width:100%;margin-top:10px;font-size:calc(14px * var(--avis-text, 1))}.add-account-shell .identity-status:empty{display:none}
/* Usable once the mailbox is there, as its name @ domain row is. */
@media (max-width:720px){.own-email-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.own-email-row [data-own=email],.own-email-row button{grid-column:1/-1}}
.mailbox-deliver-dialog{width:min(460px,calc(100vw - 30px));max-height:calc(100vh - 30px);overflow:auto;padding:0;border:1px solid rgba(127,23,42,.3);border-radius:14px;background:#fff;box-shadow:0 30px 90px rgba(43,16,22,.3)}.mailbox-deliver-dialog::backdrop{background:transparent;backdrop-filter:none}
.mailbox-deliver-shell{display:flex;flex-direction:column;gap:12px;padding:18px 20px}.mailbox-deliver-shell>header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.mailbox-deliver-shell>header div{display:flex;flex-direction:column;gap:2px}.mailbox-deliver-shell>header small{color:var(--muted,#627069);font-size:calc(12px * var(--avis-text, 1))}
.mailbox-deliver-shell label{display:flex;flex-direction:column;gap:4px;font-size:calc(12px * var(--avis-text, 1))}.mailbox-deliver-shell select,.mailbox-deliver-shell input{width:100%;min-width:0}
.mailbox-deliver-addresses{margin:0;font-size:calc(12px * var(--avis-text, 1));color:var(--muted,#627069);overflow-wrap:anywhere}
.mailbox-deliver-buttons{display:flex;gap:8px;flex-wrap:wrap}.mailbox-deliver-buttons .send-button{flex:1 1 auto}
.mailbox-deliver-result{display:flex;flex-direction:column;align-items:center;gap:10px;margin:0}.mailbox-deliver-result img{width:220px;height:220px;max-width:100%;image-rendering:pixelated;border:1px solid #e2ded9;border-radius:8px}.mailbox-deliver-result figcaption{display:flex;flex-direction:column;gap:8px;width:100%;font-size:calc(12px * var(--avis-text, 1))}.mailbox-deliver-result ol{margin:0;padding-left:18px;line-height:1.5}.mailbox-deliver-actions{display:flex;gap:8px;flex-wrap:wrap}
.conference-live-invite{display:flex;gap:8px;margin:8px 0;flex-wrap:wrap}.conference-live-invite input{flex:1 1 220px;min-width:0}.conference-live-invite-send{background:var(--wine);color:#fff;border-color:var(--wine)}

/* Reported directly ("each window must free floating and not depending a other"): these windows
   used to open modally - a dimmed, blurred backdrop locked the whole app, every other open window
   included, until they were closed. They now float like every other window (see openFloatingWindow
   and the window stack in app.js): no backdrop, the rest of the app stays usable, draggable by their
   header, and raised to the front when pressed. Windows with an explicit height stay centred; the
   others hang from the top so they size to their own content on every browser (a fixed, inset:0
   dialog with no height collapses on iPad Safari - see .contact-incubator-dialog). */
dialog.floating-window { position: fixed; inset: 0; margin: auto; z-index: 95; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); box-shadow: 0 30px 90px rgba(43,16,22,.3); }
.floating-window-handle { cursor: grab; touch-action: none; user-select: none; }
/* Notifications stay above any window, however often windows are raised past one another. */
.toast-region { z-index: 5000; }

/* Reported directly ("every window must be free floating on the entirely screen from edge to edge
   as standard not depending any other"): every window opens filling the whole screen, edge to edge,
   instead of each one's own smaller box with a margin around it - and every one of them is
   draggable and resizable from every edge and corner (bindDialogDrag/ensureWindowResizeHandles in
   app.js), so it can still be made smaller and moved anywhere on screen. A size or position the
   user gives a window (inline styles) always wins over this default. */
:is(.compose-dialog, .letter-gallery-dialog, .letter-creator-dialog, .admin-embed-dialog, .contact-incubator-dialog, .conference-dialog, dialog.floating-window:where(:not(.popup-window))) { inset: 0; margin: 0; width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; min-width: 0; min-height: 0; border-radius: 0; }
/* Reported directly ("make only popup free floating windows as this kind of windows cant go back"):
   a popup - the Deliver-by-QR window, the contact prompts, the letter's picture and QR pickers,
   Attach from AVISCloud - opened edge to edge too, covering the page it was opened from. A popup
   opens at its own size in the middle of the screen, free floating over that page: dragged by its
   header, resized from every edge, ⤢ for full screen and × to close. */
dialog.floating-window.popup-window { inset: 0; margin: auto; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }

/* The installed app's switch to AVIS.Land, AVISPay and Chat AVI (app-selector.mjs), beside the way home and like it. */
.app-switch { display: inline-grid; place-items: center; flex: 0 0 auto; color: var(--wine); text-decoration: none; }
.app-switch[hidden] { display: none; }

/* Reported directly ("Don't forget the green / red dot"): next to the alias being created, green
   when the address is free, red when it is taken, grey until it is checked. */
.alias-dot{display:inline-block;flex:0 0 14px;width:14px;height:14px;border-radius:50%;background:#c9c2c4;vertical-align:middle;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.alias-dot.is-free{background:#1f8f4e}
.alias-dot.is-taken{background:#c62828}
/* The red domains of an "@domain" selector, for an administrator: the step missing and "Make ready" (app.js renderDomainNote). */
.domain-note{display:block;margin:6px 0 0;font-size:.85em;color:#756f72}
/* Below the Mailbox name/Domain row, not inside it (the note would stretch the row's fields); hidden with the Domain. */
.contact-editor-row:has(#contactEditorAliasDomainField[hidden])~#contactEditorAliasDomainNote{display:none}
.domain-note-line{display:block;padding:2px 0}
.domain-note a{color:#7f172a;font-weight:600}

/* Registration (self-registration.mjs, Document_22): the Contact Incubator itself is the
   registration - the member's own card, their own address and password, then Activate. */
.contact-registration-note{margin:0 0 10px;font-size:calc(13px * var(--avis-text, 1));line-height:1.45;color:#5e575a}

/* The administrator's Password card on a contact (Contact Incubator). */
.contact-editor-password-reset{display:grid;gap:10px;padding:12px;border:1px solid var(--line);background:#fffafb}
.contact-editor-password-reset .identity-status:empty{display:none}
.contact-editor-grid label.contact-editor-check{display:flex;align-items:center;gap:8px;font-weight:600}
.contact-editor-grid label.contact-editor-check input{width:auto;margin:0}
.contact-editor-password-actions{display:flex;flex-wrap:wrap;gap:8px}
.contact-editor-password-actions .danger{color:#a10e25;border-color:#e3b4bd}

/* Reported directly ("In user and admin all windows must be standalone... Each service must be not
   depending any other window or service opened and managed... do not any blur effect or an blocking
   of any other function"): no window blurs or dims what is behind it, and none - the sign-in prompt
   included - blocks the rest of the page. */
dialog::backdrop { background: transparent; }

/* Reported directly ("Each window must have X for closing"): the contact-sync question gets the same X every other
   window has. */
.contact-sync-consent-shell { position:relative; }
.contact-sync-consent-close { position:absolute; top:6px; right:6px; }

/* Full screen is full screen: a window scaled by its sides or corners (window-frame-client.mjs) fills
   the screen unscaled while it is full screen, and returns to its own scale afterwards. */
.dialog-fullscreen{transform:none!important}
.compose-inline-image.is-moving{opacity:.55}
.team-chat.is-file-drop{background-color:#fff9fa}

/* Reported directly ("The system and typing fonts must be cleared and nice size"): every field a
   person types into uses the app's own font at a readable size - never a tiny 10-12px one. Rich
   editors (an email's or a letter's own text) keep the fonts chosen inside them. */
:is(input:not([type]), input[type=text], input[type=email], input[type=search], input[type=password], input[type=tel], input[type=url], input[type=number], textarea) { font-family: var(--font-ui); font-size: max(calc(14px * var(--avis-text, 1)), 1em); line-height: 1.4; }

/* The piece of a paragraph a page break cut off keeps justified lines justified up to the cut -
   letters are justified unless a paragraph is aligned otherwise. */
.letter-page-body [data-letter-continues]:is([style*="justify"],:not([style*="text-align"])){text-align-last:justify}
/* Reported directly: "Left side below Ai window must be an expandable scrolling list appearing of last 10 issued letters." */
.letter-recent-section{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.letter-recent-section>summary{cursor:pointer;color:var(--wine);font-size:calc(11px * var(--avis-text, 1));font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.letter-recent-list{max-height:240px;margin:10px 0 0;padding:0;overflow-y:auto;list-style:none;display:grid;gap:4px;font-size:calc(12px * var(--avis-text, 1));color:var(--muted)}
.letter-recent-list button{width:100%;display:grid;gap:2px;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:#fff;text-align:left;cursor:pointer}
.letter-recent-list strong{font-size:calc(12px * var(--avis-text, 1));font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.letter-recent-list small{font-size:calc(10px * var(--avis-text, 1));color:var(--muted)}
/* Reported directly: "Video inserting is not function" and "all kind of gratulation cards created by Ai". */
.letter-ai-card{padding:8px 12px;border:1px solid var(--wine);border-radius:6px;background:#fff;color:var(--wine);font-weight:700;font-size:calc(12px * var(--avis-text, 1));cursor:pointer}
/* A video on the shelf: its first picture, with a play mark. */
/* Reported directly: "the letter and text handler at the header must be completed. There are missing tools." */
.letter-format-toolbar button:disabled{opacity:.4;cursor:default}
.letter-highlight-color{height:30px;flex:0 0 auto;display:inline-flex;align-items:center;gap:2px;padding:0 4px;border:1px solid var(--line);border-radius:5px;background:#fff;cursor:pointer}
.letter-highlight-color svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}
.letter-format-toolbar .letter-highlight-color input[type=color]{width:18px;height:18px;padding:0;border:0;border-radius:3px}

/* Full size and back for every floating window (addWindowFullSize): it fills the screen over its own
   position and size, which come back with it. */
.window-header-actions{display:flex;align-items:center;gap:6px;flex:none}
.window-full-button{font-size:calc(18px * var(--avis-text, 1));line-height:1}
:is(dialog.floating-window,dialog.letter-resource-dialog).dialog-fullscreen{inset:0!important;left:0!important;top:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;margin:0!important;border-radius:0!important}
:is(dialog.floating-window,dialog.letter-resource-dialog).dialog-fullscreen .dialog-resize-handle{display:none}
dialog.letter-resource-dialog.dialog-fullscreen .letter-resource-shell{height:100dvh}

/* A service floating in the video room (embed-in-page, embed-bootstrap.js): the room's window is its
   window, with the one bar and the one X - no second X inside it, and no second bar for the Contact
   Incubator, whose bar held only its name and that X. */
body.embed-in-page :is(#composeClose,#contactIncubatorClose,#letterCreatorClose){display:none!important}
body.embed-in-page #composeMessages{display:none!important}
body.embed-in-page .contact-incubator-header{display:none!important}
/* Reported directly, on Messages floating in Boardroom 01, its page heading and the empty space below
   its card struck out: "Remove that helper window totally". In a window of its own Messages is the
   private messages alone, edge to edge: no page heading, no card inside the window, nothing below. */
body.embed-desktop-window.embed-messages .connect-header{display:none!important}
body.embed-desktop-window.embed-messages .connect-view{padding:0;overflow:hidden}
body.embed-desktop-window.embed-messages .connect-layout{margin:0}
body.embed-desktop-window.embed-messages .team-chat{height:100vh;height:100dvh;min-height:0;border:0!important;border-radius:0!important;box-shadow:none!important}
body.embed-desktop-window.embed-messages .team-message-list{flex:1;max-height:none}
/* Reported directly: "Don't show framing at images. Please do not use any optical design helper framing tools". The picked picture's choices sit in the writing tools, not on the picture. */
.picture-tools{display:inline-flex;align-items:center;gap:4px}.picture-tools[hidden]{display:none}.picture-tools select{max-width:150px}.picture-tools input[type=range]{width:110px;min-width:0;margin:0 4px;accent-color:var(--wine)}
[data-letter-asset-cursor=nwse] .letter-placed-asset{cursor:nwse-resize}[data-letter-asset-cursor=nesw] .letter-placed-asset{cursor:nesw-resize}[data-letter-asset-cursor=ew] .letter-placed-asset{cursor:ew-resize}[data-letter-asset-cursor=ns] .letter-placed-asset{cursor:ns-resize}.picture-tools button{width:auto;min-width:0;padding:0 10px}

/* Reported directly, with the Contact Incubator on an iPhone: "The app is not much responsive and
   screen order must be done new". The app runs edge to edge (viewport-fit=cover), so the phone's
   status bar was drawn over the top bar and over every window's own bar (the clock on "Contact
   Incubator"). The top bar now leaves the status bar its room, and the windows open between the
   status bar and the home indicator. */
/* And on an iPad: "the app makes a white overly footer covering the tools of the app" - the band its keyboard keeps
   free while a field is written in (--seen-cut, bindSeenScreen in app.js) is the windows' foot as well. */
:root { --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--seen-cut, 0px)); --topbar: calc(76px + var(--safe-top)); }
@media (max-width: 900px) { :root { --topbar: calc(66px + var(--safe-top)); } }
.topbar { padding-top: var(--safe-top); }
:is(.compose-dialog, .letter-gallery-dialog, .letter-creator-dialog, .admin-embed-dialog, .contact-incubator-dialog, .conference-dialog, dialog.floating-window:where(:not(.popup-window))) { inset: var(--safe-top) 0 var(--safe-bottom) 0; height: calc(100dvh - var(--safe-top) - var(--safe-bottom)); max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom)); }
.letter-creator-dialog.dialog-fullscreen, .letter-gallery-dialog.dialog-fullscreen, .conference-dialog.dialog-fullscreen, .contact-incubator-dialog.dialog-fullscreen, :is(dialog.floating-window, dialog.letter-resource-dialog).dialog-fullscreen { top: var(--safe-top) !important; bottom: var(--safe-bottom) !important; height: calc(100dvh - var(--safe-top) - var(--safe-bottom)) !important; }
/* The Contact Incubator on a phone, in a phone's own order: its tools in one row under the title,
   then the list across the whole width; a contact opened (or a new one) takes the whole width in its
   place, and Contacts in the tool row brings the list back (showContactDetailOnPhone in app.js). The
   list and the contact used to stand side by side, leaving the contact some 90px. */
@media (max-width: 720px) {
  .contact-incubator-body { flex-direction: column; }
  .contact-incubator-rail { width: auto; flex-direction: row; align-items: center; gap: 2px; padding: 4px 8px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .contact-rail-button { flex: 0 0 auto; min-width: 44px; min-height: 44px; justify-content: center; }
  .contact-rail-id { display: none; }
  .contact-incubator-contacts { flex: 1 1 auto; border-right: 0; padding: 12px 14px; }
  .contact-incubator-contacts:not([hidden]) ~ .contact-incubator-editor { display: none; }
  .contact-incubator-contacts .contact-actions { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .contact-incubator-contacts .contact-actions .secondary-button { flex: 1 1 30%; height: 38px; font-size: calc(12px * var(--avis-text, 1)); }
  .contact-incubator-editor { padding: 14px; }
  .contact-incubator-contacts .contact-list label { min-height: 48px; padding: 8px 4px; font-size: calc(14px * var(--avis-text, 1)); }
}

/* Existing workspace behavior; unchanged by the AVISphare theme. */
.chat-send-icon{display:none}
body.embed-messages .connect-layout{display:flex;height:100vh;height:100dvh;margin:0;background:#fff}
body.embed-messages .chat-contacts{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);align-items:center;flex:0 0 clamp(250px,32%,360px);min-width:0;min-height:0;border-right:1px solid var(--line)}
body.embed-messages .chat-list-head{padding:10px 0 10px 12px}
body.embed-messages .chat-list-head strong{display:none}
body.embed-messages .chat-contacts input{min-width:0;margin:10px 12px 10px 10px}
body.embed-messages #chatContactSearch{padding-left:36px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f172a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") no-repeat 10px center/18px}
body.embed-messages .chat-forward-bar{grid-column:1/-1;margin:0 12px 8px}
body.embed-messages .chat-contact-list{grid-column:1/-1;align-self:stretch;padding:0 0 12px}
body.embed-messages .chat-contact{align-items:center;padding:10px 14px}
body.embed-messages .chat-contact .chat-avatar{width:48px;height:48px;font-size:calc(16px * var(--avis-text, 1))}
body.embed-messages .chat-row-name{font-size:calc(16px * var(--avis-text, 1));font-weight:700}
body.embed-messages .chat-face-panel{top:64px;left:10px;right:auto;width:min(360px,calc(100vw - 24px))}
body.embed-messages .team-chat{flex:1;height:auto;min-width:0;min-height:0;border:0!important;border-radius:0!important;box-shadow:none!important}
body.embed-messages .chat-head{border-bottom:1px solid var(--line)}
.chat-head-contact{display:flex;align-items:center;gap:10px;flex:1;min-width:0}
.chat-head-contact strong{min-width:0;font-size:calc(16px * var(--avis-text, 1));font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-head-contact .chat-avatar{width:38px;height:38px}
.chat-head .chat-back{display:none}
.chat-head .chat-back .mi-back{width:28px;height:22.5px}
body.embed-messages:not(.chat-open) :is(#teamMessageForm,#chatStickerPanel){display:none!important}
/* Narrow: one column - the contacts, or the conversation chosen with its back arrow. */
@media(max-width:719px){
  body.embed-messages .connect-layout{flex-direction:column}
  body.embed-messages .chat-contacts{flex:1 1 auto;border-right:0}
  body.embed-messages .team-chat{order:-1;flex:0 0 auto}
  /* Codex review finding: a window of its own (embed-desktop-window) gives the conversation the whole window's height -
     with the contacts showing it is its bar alone, so the contacts have the rest. */
  body.embed-messages:not(.chat-open) .team-chat{height:auto}
  body.embed-messages:not(.chat-open) .team-chat>:not(.chat-head){display:none!important}
  body.embed-messages:not(.chat-open) .chat-head :is(#chatDelete,#chatVoiceCall,#chatCall,#chatInvite){display:none}
  body.embed-messages.chat-open .chat-contacts{display:none}
  body.embed-messages.chat-open .team-chat{flex:1 1 auto}
  body.embed-messages.chat-open .chat-head .chat-back{display:inline-grid}
}
body.embed-messages .team-chat>header:not(.chat-head),body.embed-messages .private-message-target,body.embed-messages .message-file-row,body.embed-messages #whatsappSend{display:none!important}
.chat-contacts{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--line);background:#fff}
.chat-contacts[hidden]{display:none}
.chat-contacts input{margin:12px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font:inherit;background:#fff}
.chat-contact-list{flex:1;min-height:0;margin:0;padding:0 6px 12px;list-style:none;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.chat-contact:hover,.chat-contact[aria-current="true"]{background:var(--wine-soft)}
.chat-avatar{display:inline-grid;place-items:center;flex:none;width:38px;height:38px;border:1px solid #2a2a2e;border-radius:50%;background:#fff;color:var(--wine);font-weight:600;font-size:calc(14px * var(--avis-text, 1))}
/* Reported directly, with a WhatsApp chat list as the template: "the contact name is the hading and the message is
   clickable to expand. Ad a user face or an avatar list offered selected by the user". Then: "The names must be
   horizontal. Not a row" - "No helper or explainer text nothing": the round picture and the name on one line. */
.chat-contacts{position:relative}
.chat-list-head{display:flex;align-items:center;gap:12px;padding:12px 14px 0}
.chat-list-head strong{font-size:calc(22px * var(--avis-text, 1));font-weight:800;letter-spacing:-.01em}
.chat-me{display:inline-grid;place-items:center;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;box-shadow:0 3px 10px #00000040}
.chat-me .chat-avatar{width:42px;height:42px}
.chat-me .chat-avatar:empty{visibility:visible}
.chat-contact{display:flex;align-items:flex-start;gap:12px;width:100%;margin:0;padding:12px 8px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.chat-contact .chat-avatar{width:54px;height:54px;font-size:calc(18px * var(--avis-text, 1))}
.chat-row-name{min-width:0;font-size:calc(17px * var(--avis-text, 1));font-weight:800;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-avatar{overflow:hidden}
.chat-avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.chat-avatar.is-avatar{background:#f7f2ec}.chat-avatar.is-avatar img{object-fit:contain;padding:12%;border-radius:0}
.chat-face-panel{position:absolute;z-index:5;top:64px;left:10px;right:10px;padding:12px;border:1px solid #9b1c20;border-radius:14px;background:#fff;box-shadow:0 12px 34px #00000059}
.chat-face-panel[hidden]{display:none}
.chat-face-panel header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.chat-face-panel header .chat-icon{width:34px;height:34px}
.chat-face-actions{display:flex;gap:8px;margin-bottom:12px}
.chat-face-actions button,.chat-sticker-packs button{margin:0;padding:8px 13px;border:1px solid #9b1c20;border-radius:8px;background:#fff;color:var(--wine);font:inherit;font-size:calc(13px * var(--avis-text, 1));font-weight:650;box-shadow:0 3px 10px #00000059;cursor:pointer}
.chat-face-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:10px}
.chat-face-choice{display:grid;place-items:center;align-self:start;aspect-ratio:1;padding:0;border:2px solid transparent;border-radius:50%;background:#f7f2ec;cursor:pointer;overflow:hidden}
.chat-face-choice img{max-width:72%;max-height:72%;object-fit:contain}
.chat-face-choice[aria-selected="true"]{border-color:#9b1c20}
/* The generic people (member-faces.mjs) fill their circle; the list of 132 scrolls in its panel. */
.chat-avatar.is-person{background:#fff}.chat-avatar.is-person img{object-fit:cover;padding:0;border-radius:50%}
.chat-face-choice.is-person img{width:100%;height:100%;max-width:none;max-height:none;object-fit:cover}
.chat-face-grid{max-height:min(52vh,420px);overflow-y:auto;padding:2px}
/* A contact's picture at the head of its card in the Contact Incubator, another chosen in the panel over the card. */
.contact-incubator-editor form{position:relative}.contact-incubator-editor form>header>.contact-face+div{margin-right:auto}
.contact-face{flex:none;margin:0;padding:0;border:0;border-radius:50%;background:none;box-shadow:none;cursor:pointer}.contact-face:disabled{cursor:default;opacity:1}
.contact-face .chat-avatar{width:56px;height:56px;font-size:calc(20px * var(--avis-text, 1))}
.contact-face-panel{top:72px}
/* Reported directly: "Then offer stickers from the markets to sent for the messages". */
.chat-sticker-panel{display:grid;gap:10px;max-height:min(46dvh,320px);padding:10px 12px;border-top:1px solid var(--line);background:#fff}
.chat-sticker-panel[hidden]{display:none}
.chat-sticker-packs{display:flex;gap:8px;overflow-x:auto}
.chat-sticker-packs button[aria-pressed="true"]{background:#9b1c20;color:#fff}
.chat-sticker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:10px;overflow-y:auto;overscroll-behavior:contain}
.chat-sticker-choice{aspect-ratio:1;padding:0;border:0;border-radius:18px;background:none;cursor:pointer;box-shadow:0 3px 10px #00000040;overflow:hidden}
.chat-sticker-choice img{width:100%;height:100%;object-fit:cover;display:block}
.team-message-list article.chat-sticker-message{width:auto;max-width:200px;padding:0;border:0;background:transparent}
.team-message-list article.chat-sticker-message header{flex-direction:column;gap:0;padding:0 4px 4px}
.team-message-list article.chat-sticker-message.own header{align-items:flex-end}
.chat-sticker{display:block;width:160px;height:160px;padding:0;border:0;border-radius:22px;background:none;cursor:pointer;box-shadow:0 6px 18px #00000040;overflow:hidden}
.chat-sticker img{width:100%;height:100%;object-fit:cover;display:block}
/* Reported directly: "Stickers offerings form internet downloading or making avatars from user or 3d interactive from
   photos as sticker sending". One's own stickers stand cut out, without a frame; making one is a tile of its own. */
.chat-sticker-search{display:flex;gap:8px;margin:0}
.chat-sticker-search[hidden]{display:none}
.chat-sticker-search input{flex:1;min-width:0;padding:9px 12px;border:1px solid var(--line);border-radius:10px;font:inherit;background:#fff}
.chat-sticker-make{display:grid;place-items:center;align-content:center;gap:4px;aspect-ratio:1;padding:0;border:1px solid #9b1c20;border-radius:18px;background:#fff;color:var(--wine);font:inherit;font-size:calc(12.5px * var(--avis-text, 1));font-weight:700;box-shadow:0 3px 10px #00000059;cursor:pointer}
.chat-sticker-make svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.chat-sticker-cell{position:relative}
.chat-sticker-cell .chat-sticker-choice{width:100%}
.chat-sticker-choice,.chat-sticker{position:relative}
.chat-sticker-choice.is-own,.chat-sticker.is-own{border-radius:0;box-shadow:none;overflow:visible}
.chat-sticker-choice.is-own img,.chat-sticker.is-own img{object-fit:contain;filter:drop-shadow(0 3px 6px #00000040)}
.chat-sticker-choice.is-working img{opacity:.45}
.chat-sticker-choice:disabled{cursor:default}
.chat-sticker-remove{position:absolute;top:-6px;right:-6px;display:grid;place-items:center;width:24px;height:24px;margin:0;padding:0;border:1px solid #9b1c20;border-radius:50%;background:#fff;color:var(--wine);box-shadow:0 2px 6px #00000059;cursor:pointer}
.chat-sticker-remove svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}
.chat-sticker-3d-badge{position:absolute;right:4px;bottom:4px;padding:2px 7px;border-radius:999px;background:#9b1c20;color:#fff;font-size:calc(11px * var(--avis-text, 1));font-weight:800;letter-spacing:.04em}
.chat-sticker-3d{width:220px;height:220px;cursor:grab;box-shadow:none;overflow:visible}
.chat-sticker-3d iframe{display:block;width:100%;height:100%;border:0;background:transparent}
/* Reported directly: "Make as well deleting and forwarding messages tool" - then, with the design uploaded (07 IconMessage):
   one's own message carries its forward arrow at its right, a chosen one (a tap) a dark red line around it. */
.team-message-list article{position:relative;cursor:default}
.team-message-list article.has-forward>:not(header):not(.chat-forward):not(.chat-delete){margin-right:34px}
.team-message-list article.has-forward:not(.own):not(.is-chosen)>:not(header){margin-right:0}
.team-message-list article.has-forward:not(.own):not(.is-chosen) .chat-forward{display:none}
.team-message-list :is(.chat-forward,.chat-delete){position:absolute;right:8px;bottom:8px}
.team-message-list .chat-delete{bottom:auto;top:8px}
.team-message-list article.is-chosen{box-shadow:0 0 0 2px #880303}
.chat-forwarded{display:block;margin-top:4px;color:var(--muted);font-size:calc(12px * var(--avis-text, 1));font-style:italic}
.chat-forward-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 12px 0;padding:8px 8px 8px 14px;border:1px solid #9b1c20;border-radius:12px;background:#fff;color:var(--wine);box-shadow:0 3px 10px #00000040}
.chat-forward-bar[hidden]{display:none}
.chat-forward-bar .chat-icon{width:32px;height:32px}
.chat-contacts.is-forwarding .chat-contact:disabled{opacity:.4;cursor:default}
.chat-contact-contact .chat-avatar{background:#fff;border:1px solid #9b1c20}
.chat-avatar:empty{visibility:hidden}
/* Reported directly, with the design uploaded: "Make in all instances where video or messages involved the design as in
   the enclosed 07 IconMessage zip". After the contacts in the window's header: trash, camera, calendar, full screen and
   ×; the design's icons stand plain on the window (message-icons.mjs) - no circle, frame or shadow. */
.chat-head{display:flex;align-items:center;gap:13px;padding:10px 14px;border-bottom:1px solid #f5f3f4;flex:0 0 auto;background:#fff}
.chat-head[hidden]{display:none}
.chat-head .chat-icon{min-width:0;padding:2px 0}
.chat-icon{display:inline-grid;place-items:center;flex:none;min-width:28px;min-height:28px;margin:0;padding:2px;border:0;border-radius:6px;background:transparent;color:#880303;box-shadow:none;cursor:pointer;line-height:0}
.chat-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.chat-icon:disabled{opacity:.3;cursor:default}.chat-icon[hidden]{display:none}
.chat-icon:focus-visible{outline:2px solid #880303;outline-offset:2px}
.chat-invite{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--line)}
.chat-invite[hidden]{display:none}.chat-invite input{flex:1 1 180px;min-width:0;padding:9px 10px;border:1px solid #9b1c20;border-radius:8px;font:inherit}
.chat-invite-send{display:flex;flex-wrap:wrap;gap:8px}
:is(.chat-invite-send,.chat-send-ways,.chat-call-bar,.chat-invitation-actions,.chat-call-card) button{margin:0;padding:8px 13px;border:1px solid #9b1c20;border-radius:8px;background:#fff;color:var(--wine);font:inherit;font-size:calc(13px * var(--avis-text, 1));font-weight:650;box-shadow:0 3px 10px #00000059;cursor:pointer}
:is(.chat-invite-send,.chat-send-ways,.chat-call-bar,.chat-invitation-actions) button[hidden]{display:none}
.chat-call-bar{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--line);background:#fff}
.chat-call-bar[hidden]{display:none}.chat-call-bar span{flex:1;font-weight:600}
.chat-call-bar #chatCallEnd{display:inline-grid;place-items:center;padding:4px;border:0;background:transparent;color:#880303;box-shadow:none}.chat-call-bar #chatCallEnd svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9}
/* A call's JOIN and the ring's answers are the design's icons too (message-icons.mjs), plain. */
:is(.chat-call-bar,.chat-call-card,.chat-invitation-actions,.incoming-call) .mi-button{padding:4px;border:0;border-radius:6px;background:transparent;box-shadow:none}
.chat-invitation{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.chat-invitation img{width:36px;height:36px;flex:none}.chat-invitation>div:first-of-type{display:grid;flex:1;min-width:150px}.chat-invitation small{color:var(--muted)}
/* An invitation's picture (invitation-picture.mjs) in the conversation, its answer under it. */
.chat-invitation.has-picture{display:grid;justify-items:start;gap:8px}
.chat-invitation .chat-invitation-picture{width:min(100%,360px);height:auto;aspect-ratio:1200/630;border-radius:10px;box-shadow:0 3px 10px #00000033}
.chat-invitation-actions{display:flex;flex-wrap:wrap;gap:6px;flex-basis:100%}.chat-invitation-actions input{padding:7px 9px;border:1px solid #9b1c20;border-radius:8px;font:inherit}
.chat-call-card{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px}.chat-call-card strong{font-size:calc(18px * var(--avis-text, 1))}
/* The box after the design: the attach, camera and sticker icons, a plain field with the robot inside it, the send icon. */
.chat-write{position:relative;display:block}
.chat-robot{position:absolute;right:8px;top:50%;transform:translateY(-50%)}
/* A.V.I.S comes when the robot calls him, instead of standing over the conversation. */
body.embed-messages:not(.avi-called) .avi-character{display:none!important}
body.embed-messages #teamMessageForm{display:flex;align-items:center;gap:10px;padding:12px 14px;border-top-color:#e8e4e5}
body.embed-messages .chat-write{display:flex;flex:1;min-width:0}
body.embed-messages #teamMessageForm[hidden]{display:none}
body.embed-messages #teamMessageBody{flex:1;min-height:70px;height:70px;max-height:30dvh;resize:none;border:1px solid #655656;border-radius:6px;padding:10px 56px 10px 12px}
body.embed-messages #teamMessageAttachmentList{order:-1;flex-basis:100%}
body.embed-messages #teamMessageForm{flex-wrap:wrap}
body.embed-messages #teamMessageForm>div:last-child{margin:0;flex:none}
body.embed-messages .send-button{width:auto;height:auto;padding:4px;justify-content:center;border:0;border-radius:6px;background:transparent;color:var(--wine);box-shadow:none}
body.embed-messages .send-button span:not(.mi){display:none}
body.embed-messages .chat-send-icon{display:block}
body.embed-messages .team-message-list{flex:1;max-height:none;background:#fff}
/* The AVISphere rings for a call (watchIncomingCalls): who calls, Accept and Decline. */
.incoming-call{position:fixed;left:50%;top:calc(14px + var(--safe-top,0px));transform:translateX(-50%);z-index:2147483000;display:flex;align-items:center;gap:12px;max-width:min(94vw,520px);padding:12px 14px;border:1px solid #9b1c20;border-radius:12px;background:#fff;color:var(--ink);box-shadow:0 12px 34px #00000059}
.incoming-call[hidden]{display:none}.incoming-call img{width:32px;height:32px}.incoming-call strong{flex:1}
.incoming-call button{margin:0;padding:9px 14px;border:1px solid #9b1c20;border-radius:8px;background:#fff;color:var(--wine);font:inherit;font-weight:650;box-shadow:0 3px 10px #00000059;cursor:pointer}
/* Reported directly: "The email button opens the incoming email popup window with composer icon". The office's Email is the
   mailbox alone - its messages and the one open - with the composer's icon above the list. */
body.embed-mail :is(.topbar,.app-rail,.mail-nav,.app-header-menu,.mobile-scrim){display:none!important}
body.embed-mail .app-shell{grid-template:minmax(0,1fr)/minmax(0,1fr);height:100dvh}
body.embed-mail .main-surface{grid-column:1;grid-row:1}
body.embed-mail #homeView{display:none!important}
/* Then, with a picture of a square and a pencil: "remove the red button instead adding the small email composing icon" - the
   icon alone, dark on the white list, as the list's other icons. */
.list-compose{color:var(--ink)}.list-compose svg{width:24px;height:24px;stroke-width:1.9}
/* Reported directly: "Save the card into the users contact incubator. Make the Card as a virtual business card in 3D
   interactive sendable directly via Whatsapp, email or our message system (not as a link) directly as the 3D interactive
   card". Each card turns in its own frame, without a frame around it; in a conversation it stands as a sticker does. */
.business-card-list{display:grid;gap:14px;margin:4px 0 10px}
.business-card-item{position:relative;display:grid;gap:6px;justify-items:start}
.business-card-view{width:min(340px,100%);aspect-ratio:1.45;border:0;background:transparent}
.business-card-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.business-card-message{min-height:36px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:#fff;font:inherit;color:var(--ink)}
.business-card-remove{position:absolute;top:0;right:0}
/* The open contact's own row: my card sent straight to them (renderContactSendCard). */
.contact-send-card{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0 0}
.contact-send-card>span{font-size:calc(12px * var(--avis-text, 1));font-weight:700;color:var(--ink)}
.contact-send-card select{min-height:36px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:#fff;font:inherit;font-size:calc(16px * var(--avis-text, 1));color:var(--ink)}
.contact-send-card .identity-status{flex-basis:100%;margin:0}
.team-message-list article.chat-card-message{width:auto;max-width:320px;padding:0;border:0;background:transparent}
.team-message-list article.chat-card-message header{flex-direction:column;gap:0;padding:0 4px 4px}
.team-message-list article.chat-card-message.own header{align-items:flex-end}
.chat-business-card{display:block;width:min(300px,70vw);aspect-ratio:1.45;border:0;background:transparent}
.chat-card-choice{display:grid;grid-template-rows:1fr auto;aspect-ratio:auto;box-shadow:none;border-radius:12px}
.chat-card-choice iframe{width:100%;aspect-ratio:1.45;border:0;pointer-events:none;background:transparent}
.chat-card-choice span{font-size:calc(11px * var(--avis-text, 1));font-weight:600;color:var(--ink);padding:2px 0}
.chat-card-choice{grid-column:span 2}

/* Reported directly: "The fonts for filling the contact incubator are too small and not industrial standard. They should be
   NOT bold and at least 30 to 50% larger". Everything a contact is filled in with, in regular weight: what is typed 19px
   (was 13-14px, and bold from its label), its labels 13px and 15px (were 9.5px and 11px), the section titles 14px (were
   10px). The typed text at 16px or more is also what a phone or iPad keeps without zooming in on a field. */
.contact-incubator-editor form :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:calc(19px * var(--avis-text, 1));font-weight:400}
.contact-incubator-editor form .contact-editor-card :is(label,.contact-editor-picker),.contact-incubator-editor form .contact-editor-card :is(label,.contact-editor-picker)>span{font-size:calc(13px * var(--avis-text, 1));font-weight:400}
.contact-incubator-editor form :is(.contact-editor-grid label,.contact-editor-multi>label,.contact-multi-heading,.contact-editor-picker,.contact-editor-picker>span,.contact-editor-link-label,.contact-multi-add,.contact-picker-selected,.contact-chip){font-size:calc(15px * var(--avis-text, 1));font-weight:400}
.contact-incubator-editor form .contact-editor-grid label.contact-editor-check{font-weight:400}
.contact-incubator-editor form .contact-editor-section{font-size:calc(14px * var(--avis-text, 1));font-weight:400}
.contact-incubator-editor form :is(.contact-picker-matches li,.contact-picker-matches li .contact-picker-match-name){font-size:calc(15px * var(--avis-text, 1));font-weight:400}
.contact-incubator-editor form .contact-picker-matches li .contact-picker-match-detail{font-size:calc(14px * var(--avis-text, 1))}
.contact-incubator-editor form .contact-editor-empty{font-size:calc(16px * var(--avis-text, 1))}
/* Reported directly, on an iPad: "In contact there is the save button as an overly above instead build into for save the
   email alias and the page is totally flattery". Save contact and Cancel stand at the end of the form, under its last field,
   instead of a bar stuck over the fields (the rail's Save is always at hand); a tick box and its words share one line; and
   the search and the fields of its other cards (identity, logo, mail accounts) are 16px, below which the iPad zooms the
   whole page in on a field as soon as it is tapped. */
.contact-incubator-contacts .contact-search-field input,.contact-incubator-dialog :is(.kyc-step,.identity-logo-describe,.identity-logo-editor) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){font-size:calc(16px * var(--avis-text, 1));font-weight:400}
/* "And the page must be a free floating desktop popup window": on a tablet or a phone, where a window of its own would be a
   tab, it floats over the page at a window's own size, as Messages does. */
.contact-incubator-dialog.contact-incubator-popup{inset:var(--safe-top) 0 var(--safe-bottom) 0;margin:auto;width:min(1000px,calc(100vw - 16px));height:min(820px,calc(100dvh - var(--safe-top) - var(--safe-bottom) - 16px));border-radius:14px;box-shadow:0 30px 90px rgba(0,0,0,.35)}
/* Inside the administration's frame the page around the window is the administration's (embed-bootstrap.js). */
html.embed-over-page,html.embed-over-page body{background:transparent}

/* Reported directly, as a "VIP job", with Apple's Mail drawn twice: "MOBILE SCREEN" and "TABLETs & PC pupup free
   floating desk window". The list is the messages alone, as Mail shows them: Select shows the boxes to
   tick and what to do with them (Archive, Spam, Delete), Done hides them again. An unread message has its dot; on a
   phone each row reads as the iPhone's - the sender and the time, the subject, two lines of the message, and › to open
   it - under the large mailbox name. */
.list-select { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--wine); font: inherit; font-size: calc(14px * var(--avis-text, 1)); font-weight: 600; cursor: pointer; }
.list-select[aria-pressed="true"] { background: var(--wine-soft); }
.reader-full-size svg { width: 18px; height: 18px; }
.message-list-panel:not(.selecting) { grid-template-rows: auto minmax(0, 1fr); }
.message-list-panel:not(.selecting) :is(.list-toolbar, .message-check) { display: none; }
.message-list-panel:not(.selecting) .message-card { grid-template-columns: minmax(0, 1fr); }
.message-card.unread .message-sender::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--wine); vertical-align: 1px; }
@media (max-width: 700px) {
  .reader-full-size { display: none; }
  .message-card { min-height: 0; padding: 12px 16px 12px 18px; }
  .message-sender { font-size: calc(16px * var(--avis-text, 1)); }
  .message-time { font-size: calc(14px * var(--avis-text, 1)); }
  .message-time::after { content: "›"; margin-left: 7px; color: #b9b1b4; font-size: calc(18px * var(--avis-text, 1)); line-height: 1; vertical-align: -1px; }
  .message-subject { margin: 3px 0 2px; font-size: calc(15px * var(--avis-text, 1)); }
  .message-preview { font-size: calc(14px * var(--avis-text, 1)); }
}
/* On an iPad - upright too - or a computer the mail window (embed=mail) has the mailboxes at its left, as Mail has: the
   folders and the mailbox switch - not the AVISphere's own tools, which stay in the AVISphere. A narrower window keeps
   them narrower, in their place (not the AVISphere's slide-in menu, which the window has no button for). */
@media (min-width: 701px) {
  body.embed-mail .app-shell { grid-template: minmax(0, 1fr) / clamp(170px, 20vw, 230px) minmax(0, 1fr); }
  body.embed-mail .app-shell .mail-nav { display: block !important; position: static; grid-column: 1; grid-row: 1; width: auto; transform: none; box-shadow: none; }
  body.embed-mail .main-surface { grid-column: 2; }
  body.embed-mail .mail-nav :is(.compose-button, .letter-creator-launcher, #contractsLauncher, #productAdminLauncher) { display: none !important; }
}
/* An upright iPad's mail window is narrow (744-834px: the list about 250px, the message about 330px). Each pane keeps to
   its column - its buttons pushed both wider, cutting off the times in the list and the star beside the sender - the
   list's buttons go above the mailbox name, as Mail has them, the message's time under its subject, and its tools sit
   closer together. A long subject in the list ends in "…" (it was cut off mid-word: an inline line has no end of its own). */
.message-list-panel, .message-reader { grid-template-columns: minmax(0, 1fr); }
.message-subject { display: block; }
.list-header { flex-wrap: wrap-reverse; row-gap: 4px; }
.list-header-actions { margin-left: auto; }
.reader-heading { flex-wrap: wrap; row-gap: 0; }
.reader-heading > div { flex: 1 1 200px; }
@media (min-width: 701px) and (max-width: 900px) {
  body.embed-mail .mail-workspace { grid-template-columns: minmax(250px, 42%) minmax(0, 1fr); }
  .reader-toolbar { padding: 0 8px; gap: 4px; }
  .tool-button { padding: 0 5px; }
}
/* Reported directly, of the mail on an iPad: "The email columns must be re-sizeable to the left side away" (app.js,
   mailColumnGrips). The folders' grip stands at the start of the page beside them, the list's on its edge; a column drawn
   to nothing is gone from view, its grip left at the edge to draw it out again. */
.main-surface, .mail-workspace { position: relative; }
.column-grip { position: absolute; z-index: 6; top: 0; bottom: 0; width: 12px; cursor: col-resize; touch-action: none; }
.column-grip[hidden] { display: none; }
.column-grip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px; background: transparent; transition: background .12s ease; }
.column-grip:hover::after, .column-grip:focus-visible::after, .column-grip.dragging::after { background: var(--wine); }
/* Its mark: where to take hold, a hand's width tall, also on a touch screen and with the column drawn away. */
.column-grip::before { content: ""; position: absolute; top: 50%; left: 3px; width: 6px; height: 42px; margin-top: -21px; border-radius: 3px; background: #d8ced1; }
.column-grip:hover::before, .column-grip.dragging::before { background: var(--wine); }
.column-grip-folders { left: 0; }
.column-grip-folders::after { left: 0; }
.column-grip-list { margin-left: -6px; }
.reader-panel.is-max ~ .column-grip-list { display: none; }
@media (pointer: coarse) { .column-grip { width: 24px; } .column-grip-list { margin-left: -12px; } .column-grip-list::after { left: 11px; } .column-grip-list::before { left: 9px; } }
/* Codex review findings (P1, PR #752): a width kept from a wider window never pushes the message out of a narrower one - the
   list leaves the message at least 280 pixels - and a column drawn away is gone only where the columns stand side by side:
   the phone's one pane and its slide-in folders show as always. */
@media (min-width: 901px) {
  .app-shell[data-folders] { grid-template-columns: var(--rail) min(var(--folders), 360px) minmax(0, 1fr); }
  .app-shell[data-folders="closed"] .mail-nav { padding-inline: 0; border-right: 0; overflow: hidden; visibility: hidden; }
}
@media (min-width: 701px) {
  body.embed-mail .app-shell[data-folders] { grid-template-columns: min(var(--folders), 40%) minmax(0, 1fr); }
  body.embed-mail .app-shell[data-folders="closed"] .mail-nav { padding-inline: 0; border-right: 0; overflow: hidden; visibility: hidden; }
  body .mail-workspace[data-list] { grid-template-columns: min(var(--list), max(0px, calc(100% - 280px))) minmax(0, 1fr); }
  .mail-workspace[data-list="closed"] .message-list-panel { border-right: 0; visibility: hidden; }
}
/* Reported directly, with a photo of the iPad's Mail: "No it is not coming back with the handle". The list drawn away, its
   grip stood on the folders' grip, under it: every pull widened the folders. Drawn away, it stands beside it. */
@media (min-width: 701px) {
  .mail-workspace[data-list="closed"] > .column-grip-list { margin-left: 12px; }
}
@media (min-width: 701px) and (pointer: coarse) {
  .mail-workspace[data-list="closed"] > .column-grip-list { margin-left: 24px; }
}
/* Reported directly: "a email sended or received must be doable click to open become a free floating window itself (all
   windows new standard)" - the window of one message (embed=message): the message alone, its tools above it. */
body.embed-message :is(.topbar,.app-rail,.mail-nav,.app-header-menu,.mobile-scrim,.message-list-panel,.reader-back,.reader-full-size){display:none!important}
body.embed-message .app-shell{grid-template:minmax(0,1fr)/minmax(0,1fr);height:100dvh}
/* Then: "yes all windows" - AVISCloud, the mailbox and an email in a window of their own, as the dialogs' (above): between a
   phone's or an iPad's own line and its foot, clear of its sides. */
body:is(.embed-documents,.embed-mail,.embed-message) .app-shell{padding:var(--safe-top) env(safe-area-inset-right,0px) var(--safe-bottom) env(safe-area-inset-left,0px)}
body.embed-message .main-surface{grid-column:1;grid-row:1}
body.embed-message #homeView{display:none!important}
body.embed-message .mail-workspace{grid-template-columns:minmax(0,1fr)}
body.embed-message .reader-panel{display:block;height:100%}
/* Reported directly, with an email opened from the office's desk on an iPad: "the email from Office goes to a white window
   where the email is glued on the left side instead of fully covering the email window" - a window 1100 wide or more took
   the mail's two columns (the list's beside the email's) with the list gone: the email has the whole window at every width.
   And "The responding arrow is covered by the MC °°° that must be moved to the right side of the MC°°°": in the app on an
   iPad (embed-bootstrap.js ipad-app-window) the iPad's own window buttons stand over the window's top left corner - the
   email's buttons start beside them. */
body.embed-message:has(#appShell) .mail-workspace:not([data-list]){grid-template-columns:minmax(0,1fr)}
body.embed-message.ipad-app-window .reader-toolbar{padding-left:96px}
/* Then, of the email writer in the app on an iPad, under the iPad's own line (time, Wi-Fi, battery): "Remove the black icon
   and clear the header there is mixed up" - its header starts below that line (as on every device, above) and beside the
   iPad's window buttons. */
body.embed-compose.ipad-app-window .compose-shell>header{padding-left:96px}
/* Reported directly, with Mail's own bar on an iPad as the picture: "In the AVISphare only keep on the header as simple icons
   the following icons: respond to the sender, respond to all senders when was send from a group, or forwarding to a receiver
   the delete icon and the search field and the icon make the full screen icon and the icon X. All other fields are in the
   right-click" - the email's head: Reply, Reply all, Forward and Delete as icons in one ring, like the picture's, Full size
   in its own; the rest (Archive, Spam, Block, Save, Select, New message, Refresh, Ask A.V.I.S, Account, Apps) in one plain
   glass list where a right-click or a finger held asks for it (liquid-writing.js bindToolList). */
.reader-toolbar .reader-tools { flex: 0 0 auto; gap: 2px; padding: 0 6px; border: 1.5px solid #1d1d1f; border-radius: 999px; background: #fff; }
.reader-toolbar .tool-button { width: 40px; height: 34px; padding: 0; justify-content: center; border: 0; border-radius: 8px; background: none; color: #1d1d1f; }
.reader-toolbar .tool-button[hidden] { display: none; }
.reader-toolbar .tool-button span { display: none; }
.reader-toolbar .tool-button svg { width: 19px; height: 19px; }
.reader-toolbar .tool-button:hover { border-color: transparent; background: #f5f5f7; color: #1d1d1f; }
.reader-toolbar .reader-full-size { width: 36px; height: 36px; border: 1.5px solid #1d1d1f; border-radius: 50%; background: #fff; color: #1d1d1f; }
/* Reported directly, with the AVISphere on an iPad, an arrow from its New message button to the email's head: "On the header
   of the inbox mount a small round icon for a new message opening to type and remove that new message button from the left
   side" - and "The email handling is must be moved to the right side of the page ans on the left side is the device handling"
   (the iPad's own window buttons over a window's top left). On an iPad and a computer the email's Reply, Reply all, Forward
   and Delete stand on the right, beside a round New message and Full size; with no email open New message stands in that
   corner; the New message on the left is gone. A phone keeps its own; an email's own window has no New message. */
:is(.reader-toolbar, .reader-empty-bar) .reader-compose { width: 36px; height: 36px; border: 1.5px solid #1d1d1f; border-radius: 50%; background: #fff; color: #1d1d1f; }
.reader-compose svg { width: 18px; height: 18px; }
.reader-empty { position: relative; }
.reader-empty-bar { position: absolute; top: 10px; right: 19px; }
@media (min-width: 701px) {
  .mail-nav .compose-button { display: none; }
  .reader-toolbar > .reader-tools { margin-left: auto; }
  .reader-toolbar > .icon-button:last-child { margin-left: 0; }
}
@media (min-width: 701px) and (max-width: 900px) { .reader-empty-bar { right: 8px; } }
@media (max-width: 700px) { :is(.reader-compose, .reader-empty-bar) { display: none; } }
body.embed-message .reader-compose { display: none; }
#mailToolsList:not(.is-listed) { display: none !important; }
#mailToolsList.is-listed { position: fixed; z-index: 2147481000; width: 220px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; display: flex; flex-direction: column; gap: 2px; border-radius: 16px; background: linear-gradient(180deg,#ffffffef,#ffffffdb); box-shadow: inset 0 0 0 1px #ffffffe6, inset 0 1px 0 #fff, 0 0 0 1px #0f172a1a, 0 16px 38px #0f172a33; }
#mailToolsList .mail-tools-group { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px; padding: 0 0 4px; border-bottom: 1px solid #1d1d1f14; }
#mailToolsList .mail-tools-group:last-child { margin: 0; padding: 0; border: 0; }
#mailToolsList .profile-control { display: contents; }
#mailToolsList :is(button, a):not([hidden]) { width: 100% !important; height: auto !important; min-height: 34px; margin: 0 !important; padding: 4px 10px !important; display: flex !important; align-items: center; justify-content: flex-start !important; gap: 10px; border: 0 !important; border-radius: 9px; background: none !important; box-shadow: none !important; color: #1d1d1f !important; font: 500 calc(13px * var(--avis-text, 1))/1.2 system-ui,-apple-system,"Segoe UI",sans-serif !important; text-align: left !important; text-decoration: none; cursor: pointer; }
#mailToolsList :is(button, a):is(:hover, :focus-visible) { background: #1d1d1f0f !important; }
#mailToolsList :is(button, a) :is(svg, img) { width: 18px; height: 18px; flex: none; }
#mailToolsList :is(.pulse, .profile-copy small) { display: none; }
#mailToolsList :is(button, a) > span:not(.pulse) { display: inline !important; }
#mailToolsList .profile-copy { display: block; text-align: left; }
#mailToolsList .profile-copy strong { font: inherit; font-weight: 500; }
#mailToolsList .list-select[aria-pressed=true]::after { content: "✓"; margin-left: auto; font-weight: 700; }
@media (prefers-reduced-transparency: reduce) { #mailToolsList.is-listed { background: #fff; } }
/* The platform's country selector (country-picker.js) where a <select> stood: in a contact's rows as borderless as the
   labels beside it, the company's phone its calling code and number side by side. */
.contact-multi-row .avis-cp-button{flex:none}
.contact-editor-card .contact-multi-row .avis-cp-button{min-height:0;padding:0 4px;border:0;background:transparent;font-size:calc(13px * var(--avis-text, 1));font-weight:400}
.company-phone{display:flex;gap:6px;min-width:0}
.company-phone input{flex:1}
.company-phone .avis-cp-button{flex:none}
/* "The phone number must be as well active for message sending and WhatsApp": beside a phone the button of its ways
   (WhatsApp, SMS, Call), beside a messenger's handle the one that opens it; in Messages a contact not on AVIS is written to
   by WhatsApp, SMS or email. */
.contact-phone-ways{flex:none;display:inline-grid;place-items:center;width:30px;height:30px;margin:0;padding:0;border:0;border-radius:6px;background:transparent;color:var(--wine);cursor:pointer}
.contact-phone-ways[hidden]{display:none}
.contact-phone-ways svg{width:17px;height:17px}
.phone-ways-menu{position:fixed;z-index:2147483000;display:flex;flex-direction:column;min-width:150px;padding:6px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 14px 36px rgba(36,15,20,.2)}
.phone-ways-menu button{margin:0;padding:10px 12px;border:0;border-radius:7px;background:none;color:#241f21;font:inherit;font-size:calc(14px * var(--avis-text, 1));text-align:left;cursor:pointer}
.phone-ways-menu button:hover,.phone-ways-menu button:focus-visible{background:#f6eff1;color:var(--wine);outline:none}
.chat-send-ways{display:flex;flex-wrap:wrap;gap:8px}
/* WhatsApp and SMS take the text written; a file, a photo or a sticker stays with AVIS members. */
.chat-send-ways[hidden],#teamMessageForm.is-guest :is(.send-button,#whatsappSend,#chatAttach,#chatCapture,#chatStickers,.message-file-row){display:none!important}
.whatsapp-number-row{display:flex;gap:6px;min-width:0}.whatsapp-number-row input{flex:1;min-width:0}.whatsapp-number-row .avis-cp-button{flex:none}
/* Reported directly: "the activation button of an alias it is not shown under the first row" - the mailbox name's own
   Activate, and its X once the mailbox is made, at the end of its row. */
.contact-editor-alias-actions{display:flex;align-items:flex-end;gap:8px}.contact-editor-alias-actions:not(:has(:not([hidden]))){display:none}
/* A given mailbox's name, locked: dimmed as its domain beside it is. */
#contactEditorAliasLocalPart:disabled{opacity:.7;color:#808080}

/* Reported directly: "complete the AVI messenger. That tool must exactly working like WhatsApp" (messages-window.js). The
   conversation as WhatsApp shows it: one's own on the right, the others' on the left, the time and one's ticks in the
   bubble's corner, the day between; under the name typing, online or last seen; in the chat list the unread count. AVIS's own
   colours. */
body.embed-messages .team-message-list{padding:10px 12px;background:#f4eff0}
body.embed-messages .team-message-list article{width:fit-content;min-width:92px;max-width:min(82%,560px);margin:0 0 4px;padding:6px 9px 7px 10px;border:0;border-radius:10px;background:#fff;box-shadow:0 1px .5px #3b0b1221}
body.embed-messages .team-message-list article.own{margin-left:auto;border-radius:10px;background:#f9e3e6}
body.embed-messages .team-message-list article::after{content:"";display:block;clear:both}
body.embed-messages .team-message-list article header{display:block;font-size:calc(13px * var(--avis-text, 1))}
body.embed-messages .team-message-list article header strong{color:#9b1c20;font-weight:700}
body.embed-messages .team-message-list article header strong[hidden]{display:none}
body.embed-messages .team-message-list article>p{display:inline;margin:0;font-size:calc(15px * var(--avis-text, 1));line-height:1.4}
body.embed-messages .team-message-list article.has-forward>p{margin-right:0}
body.embed-messages .team-message-list article:is(.chat-sticker-message,.chat-card-message){padding:0;background:transparent;box-shadow:none}
.chat-meta{float:right;display:inline-flex;align-items:center;gap:3px;margin:8px 0 -4px 12px;color:#7a6d70;font-size:calc(11px * var(--avis-text, 1));line-height:1;white-space:nowrap}
.chat-meta time{color:inherit}
.chat-ticks{display:inline-flex}
.chat-ticks svg{width:17px;height:11px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.chat-ticks.is-sent svg{width:12px}
.chat-ticks.is-read{color:#2a8bd6}
.chat-day{position:sticky;top:0;z-index:2;display:flex;justify-content:center;margin:10px 0 8px;pointer-events:none}
.chat-day span{padding:5px 12px;border-radius:8px;background:#fff;color:#5b4f52;font-size:calc(12.5px * var(--avis-text, 1));box-shadow:0 1px .5px #3b0b1221}
.chat-head-names{display:flex;flex-direction:column;justify-content:center;min-width:0}
.chat-head-names small{min-width:0;color:var(--muted);font-size:calc(12.5px * var(--avis-text, 1));line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-head-names small.is-typing{color:#9b1c20;font-weight:600}
/* The trash only once a message is chosen, as WhatsApp's, and no full screen where Messages fills the phone: the name has
   the room. */
#chatDelete:disabled{display:none}
@media(max-width:560px){#chatFullscreen{display:none!important}}
.chat-contact .chat-row-name{flex:1}
.chat-row-unread{flex:none;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#9b1c20;color:#fff;font-size:calc(12px * var(--avis-text, 1));font-weight:700;line-height:20px;text-align:center}
/* A chosen message's reactions and tools above the box; an answer's quote in its bubble; the reactions under it; a message
   taken back in italics (messages-window.js), as WhatsApp's. */
.chat-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px 12px;border-top:1px solid var(--line);background:#fff}
.chat-actions[hidden],.chat-reply-bar[hidden]{display:none}
.chat-react-row{display:flex;gap:0;padding:2px 4px;border-radius:22px;background:#f4eff0}
.chat-actions button{min-height:36px;padding:0 12px;border:0;border-radius:8px;background:transparent;color:#9b1c20;font:600 calc(14px * var(--avis-text, 1))/1 inherit;cursor:pointer}
.chat-actions .chat-react{min-width:32px;padding:0 3px;font-size:calc(20px * var(--avis-text, 1))}
.chat-actions .chat-react[aria-pressed="true"]{background:#f9e3e6}
.chat-reply-bar{display:flex;align-items:center;gap:8px;margin:0 12px;padding:8px 10px;border-left:4px solid #9b1c20;border-radius:8px;background:#f4eff0}
.chat-reply-bar.is-editing{border-left-color:#7a6d70}
.chat-reply-text{display:flex;flex:1;flex-direction:column;min-width:0;font-size:calc(13px * var(--avis-text, 1))}
.chat-reply-text strong{color:#9b1c20}
.chat-reply-text span{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-quote{display:flex;flex-direction:column;align-items:flex-start;width:100%;margin:2px 0 6px;padding:5px 8px;border:0;border-left:4px solid #9b1c20;border-radius:6px;background:#0000000d;color:inherit;font:inherit;font-size:calc(13px * var(--avis-text, 1));text-align:left;cursor:pointer}
.chat-quote strong{color:#9b1c20;font-size:calc(12.5px * var(--avis-text, 1))}
.chat-quote span{max-width:100%;color:#5b4f52;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.embed-messages .team-message-list article.has-reactions{margin-bottom:20px}
body.embed-messages .team-message-list article.is-chosen{box-shadow:0 0 0 2px #880303}
.chat-reactions{position:absolute;left:10px;bottom:-15px;padding:2px 7px;border:1px solid #e8e4e5;border-radius:12px;background:#fff;box-shadow:0 1px 2px #3b0b1221;font-size:calc(14px * var(--avis-text, 1));line-height:1.3;cursor:pointer}
.chat-edited{margin-right:3px;font-style:italic}
.team-message-list article.is-deleted>p{color:#7a6d70;font-style:italic}
.team-message-list article.is-found{box-shadow:0 0 0 3px #f2b8bf}
/* Reported directly: "Ok now lets concentrate on the the messanger". A voice message (messages-window.js): the microphone in
   the send button's place while nothing is written, the recording bar over the composer, the player in the bubble. */
#chatVoice{display:none;align-items:center;justify-content:center;padding:4px;border:0;background:none;color:var(--wine);cursor:pointer}
#chatVoice svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
#teamMessageForm.can-record.is-empty:not(.is-guest) #chatVoice{display:inline-flex}
#teamMessageForm.can-record.is-empty:not(.is-guest) .send-button{display:none}
#teamMessageForm{position:relative}
.chat-recording{position:absolute;inset:0;z-index:3;display:flex;align-items:center;gap:14px;padding:0 16px;background:#fff}
.chat-recording[hidden]{display:none}
.chat-recording .chat-icon{border:0;background:none;padding:4px;cursor:pointer}
.chat-recording-dot{width:11px;height:11px;flex:none;border-radius:50%;background:#d0103a;animation:chat-rec 1s ease-in-out infinite alternate}
.chat-recording-time{flex:1;font-weight:600;font-variant-numeric:tabular-nums}
@keyframes chat-rec{to{opacity:.25}}
.chat-voice{display:flex;align-items:center;gap:8px;min-width:min(260px,62vw);padding:2px 0}
.chat-voice-play{display:grid;place-items:center;width:36px;height:36px;flex:none;border:0;border-radius:50%;background:var(--wine);color:#fff;cursor:pointer}
.chat-voice-play::before{content:"";margin-left:3px;border-style:solid;border-width:7px 0 7px 12px;border-color:transparent transparent transparent currentColor}
.chat-voice.is-playing .chat-voice-play::before{width:11px;height:13px;margin:0;border:0;background:linear-gradient(90deg,currentColor 35%,transparent 35% 65%,currentColor 65%)}
.chat-voice input[type=range]{flex:1;min-width:0;accent-color:var(--wine)}
.chat-voice-time{font-size:calc(12px * var(--avis-text, 1));font-variant-numeric:tabular-nums;opacity:.75}
.chat-voice-speed{padding:2px 7px;border:0;border-radius:10px;background:rgba(0,0,0,.08);color:inherit;font-size:calc(12px * var(--avis-text, 1));font-weight:700;cursor:pointer}
@media(prefers-reduced-motion:reduce){.chat-recording-dot{animation:none}}
/* Reported directly: "a real messaging-video-phone system" - the handset beside the camera; a missed call says so in red. */
.chat-voice-call svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.chat-call-card.is-missed strong{color:#c0182b}



/* AVISphare: approved white glass workspace. Keep window geometry and account routing intact. */
body:has(#appShell) {
  --wine:#24272b; --wine-deep:#111315; --wine-soft:#f5f7f8;
  --ink:#17191c; --muted:#70757b; --line:#e1e4e7; --quiet:#fff;
  --shadow:0 8px 24px #222b3512;
}
body:has(#appShell) :is(.app-shell,.topbar,.app-rail,.mail-nav,.main-surface,.message-list-panel,.reader-panel) { background:#fff; }
body:has(#appShell) .topbar { border-bottom-color:#dfe3e6; }
body:has(#appShell) .brand-copy strong { color:#101214; font-size:calc(23px * var(--avis-text, 1)); letter-spacing:-.04em; margin:0; }
body:has(#appShell) .brand-copy small { color:#666; }
body:has(#appShell) .avisphare-logo { filter:grayscale(1); }
body:has(#appShell) .global-search {
  border:1px solid #d6dce0; border-radius:999px;
  background:linear-gradient(180deg,#fff,#f5f7f8 52%,#fff);
  box-shadow:inset 0 2px 3px #fff,inset 0 -2px 3px #b2bbc326,0 3px 8px #26313c16;
  color:#34383c;
}
body:has(#appShell) .global-search input { color:#222; background:transparent; }
body:has(#appShell) .global-search input::placeholder { color:#777c81; opacity:1; }
body:has(#appShell) .global-search kbd { border:1px solid #dde1e4; border-radius:9px; background:#fff; color:#444; box-shadow:0 2px 4px #00000012; }
body:has(#appShell) .mail-nav { border-right-color:#e0e4e7; }
body:has(#appShell) :is(.folder-item,.rail-item,.list-header .icon-button) { color:#30353a; }
body:has(#appShell) .folder-item { border-radius:8px; }
body:has(#appShell) .folder-item svg { color:#636b71; }
body:has(#appShell) :is(.rail-item,.compose-button,.letter-creator-launcher) img { filter:grayscale(1) drop-shadow(0 3px 3px #30394320); }
body:has(#appShell) .compose-icon { filter:grayscale(1); }
body:has(#appShell) .folder-item.active {
  color:#111; border:1px solid #d4dce0;
  background:linear-gradient(180deg,#fff,#f3f6f7 65%,#fff);
  box-shadow:inset 0 2px 2px #fff,0 3px 8px #2c39431c,0 0 9px #d6f5ff80;
}
body:has(#appShell) .message-list { padding:12px 18px; background:#fff; }
body:has(#appShell) .message-card {
  min-height:108px; margin:0 0 14px; padding:16px; border:1px solid #e1e4e7; border-radius:20px;
  background:linear-gradient(180deg,#fff,#fdfefe);
  box-shadow:inset 0 1px 1px #fff,0 4px 9px #29333e0d;
}
body:has(#appShell) .message-card.unread { background:#fff; }
body:has(#appShell) .message-card.selected {
  border-color:#a1c8d5; background:#f7fcfe;
  box-shadow:inset 0 1px 2px #fff,0 0 0 1px #d4edf5,0 0 14px #b6ebff70;
}
body:has(#appShell) .message-sender { color:#17191c; font-size:calc(16px * var(--avis-text, 1)); }
body:has(#appShell) .message-subject { color:#262a2d; font-size:calc(14px * var(--avis-text, 1)); }
body:has(#appShell) .message-preview { color:#70757b; font-size:calc(13px * var(--avis-text, 1)); }
body:has(#appShell) .message-time { color:#7a7f84; }
body:has(#appShell) .reader-empty .empty-emblem { color:#9ca7ae; background:#fff; border:1px solid #e4e7ea; box-shadow:inset 0 2px 4px #fff,0 4px 12px #26313c10; }
body:has(#appShell) .reader-empty h2 { color:#363c41; }
body:has(#appShell) .reader-empty p { color:#777d82; }
/* Feedback follows actual existing selected/pressed state; momentary buttons light only during a press. */
html body:has(#appShell) .app-shell :is(.topbar,.app-rail,.mail-nav,.list-header,.reader-toolbar)
  :is(button,a.icon-button):not(:disabled,[aria-disabled=true]):is(:active,[data-avis-press],[aria-pressed=true],[aria-selected=true],.active) {
  filter:brightness(1.12) drop-shadow(0 0 5px #b3eaff)!important;
  box-shadow:inset 0 1px 3px #fff,0 0 0 1px #c8e5ef,0 0 14px #bdefff99!important;
}
body:has(#appShell) .app-shell :is(button,a):focus-visible { outline:2px solid #47879e; outline-offset:3px; }
/* Signed-in status comes from the server-provided account state, never from a cosmetic click. */
body:has(#appShell) .topbar .avis-account-switch { padding:0; gap:12px; background:transparent; color:#15191c; }
body:has(#appShell) .topbar .avis-account-side { gap:8px; padding:4px; min-height:38px; background:transparent; color:#15191c; box-shadow:none; }
body:has(#appShell) .topbar .avis-account-side[aria-current] { box-shadow:none; background:transparent; text-decoration:underline; text-underline-offset:5px; }
body:has(#appShell) .topbar .avis-account-light {
  position:relative; width:44px; height:26px; border:1px solid #cbd0d4; border-radius:999px;
  background:linear-gradient(#e5e8eb,#f5f6f7); box-shadow:inset 0 1px 3px #00000013;
}
body:has(#appShell) .topbar .avis-account-light::after {
  content:""; position:absolute; top:1px; left:1px; width:22px; height:22px; border-radius:50%;
  background:linear-gradient(#fff,#edf0f2); border:1px solid #d8dde0; box-shadow:0 2px 4px #00000020;
}
body:has(#appShell) .topbar .avis-account-light[data-on] {
  background:linear-gradient(#48d789,#24b76b); border-color:#22a960; box-shadow:inset 0 1px 2px #ffffff75,0 0 8px #37cf7940;
}
body:has(#appShell) .topbar .avis-account-light[data-on]::after { left:19px; }
body:has(#appShell) .app-shell [role=switch][aria-checked=true] { background:#26b96c!important; color:#fff!important; }
@media(min-width:1100px) {
  body:has(#appShell) { --sidebar:220px; }
  body:has(#appShell) .brand { width:auto; margin-right:14px; }
  body:has(#appShell) .mail-workspace:not([data-list]) { grid-template-columns:minmax(360px,48%) minmax(0,1fr); }
}
@media(max-width:700px) {
  body:has(#appShell) .message-list { padding:8px; }
  body:has(#appShell) .message-card { padding:12px; margin-bottom:9px; border-radius:15px; }
  body:has(#appShell) .topbar .avis-account-switch { gap:3px; }
  body:has(#appShell) .topbar .avis-account-side { gap:4px; }
}

@media(max-width:700px) {
  body:has(#appShell) .topbar .avis-account-side { font-size:calc(11px * var(--avis-text, 1)); gap:4px; padding:2px; min-height:28px; }
  body:has(#appShell) .topbar .avis-account-light { width:30px; height:18px; }
  body:has(#appShell) .topbar .avis-account-light::after { width:14px; height:14px; }
  body:has(#appShell) .topbar .avis-account-light[data-on]::after { left:13px; }
}

@media(max-width:700px) {
 body:has(#appShell) .topbar .avis-account-side {font-size:calc(10px * var(--avis-text, 1))}
 body:has(#appShell) .topbar .avis-account-light {width:28px}
 body:has(#appShell) .topbar .avis-account-light[data-on]::after {left:11px}
}
body:has(#appShell) .brand-copy {width:132px}

.mi{display:inline-block;flex:none;vertical-align:middle;background:center/contain no-repeat}.mi-back{width:32px;height:25.5px;background-image:url(/message-icons/back.webp)}.mi-close{width:23px;height:22.5px;background-image:url(/message-icons/close.webp)}.mi-fullscreen{width:22px;height:22px;background-image:url(/message-icons/fullscreen.webp)}.mi-delete{width:25px;height:30px;background-image:url(/message-icons/delete.webp)}.mi-camera{width:39px;height:30.5px;background-image:url(/message-icons/camera.webp)}.mi-calendar{width:30px;height:29.5px;background-image:url(/message-icons/calendar.webp)}.mi-attach{width:28px;height:32px;background-image:url(/message-icons/attach.webp)}.mi-sticker{width:31px;height:31.5px;background-image:url(/message-icons/sticker.webp)}.mi-send{width:28.5px;height:28px;background-image:url(/message-icons/send.webp)}.mi-forward{width:22px;height:17.5px;background-image:url(/message-icons/forward.webp)}.mi-join{width:45px;height:24.5px;background-image:url(/message-icons/join.webp)}.mi-robot{width:40.5px;height:27px;background-image:url(/message-icons/robot.webp)}.mi-trading{width:48px;height:48px;background-image:url(/message-icons/trading.webp)}.mi-search{width:49px;height:47.5px;background-image:url(/message-icons/search.webp)}.mi-button{display:inline-grid;place-items:center;flex:none;margin:0;padding:4px;border:0;border-radius:6px;background:transparent;box-shadow:none;color:inherit;cursor:pointer;line-height:0}.mi-button:disabled{opacity:.3;cursor:default}.mi-button[hidden]{display:none}.mi-button:focus-visible{outline:2px solid #880303;outline-offset:2px}.avis-spinner{position:relative;display:grid;place-items:center;width:64px;height:64px}
.avis-spinner::before,.avis-spinner::after,.avis-loading::before,.avis-loading::after{content:"";position:absolute;border-radius:50%;border:2px solid transparent;border-top-color:#7f172a;border-right-color:#7f172a55;animation:avis-spin 1.4s linear infinite;pointer-events:none}
.avis-loading>iframe{visibility:hidden}
.avis-spinner::before{inset:0}.avis-spinner::after{inset:10px}
.avis-loading::before,.avis-loading::after{z-index:3;left:50%;top:50%;width:56px;height:56px;margin:-30px 0 0 -30px}
.avis-loading::after{width:36px;height:36px;margin:-20px 0 0 -20px}
.avis-spinner::after,.avis-loading::after{border-top-color:transparent;border-right-color:transparent;border-bottom-color:#7f172a;animation-duration:1s;animation-direction:reverse}
.avis-spinner img{width:28px;height:28px;object-fit:contain}
@keyframes avis-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.avis-spinner::before,.avis-spinner::after,.avis-loading::before,.avis-loading::after{animation-duration:3s}}