/* Owner-approved original logo/artwork. White light enters a thin, small-corner glass plate. */
html body:has(#appShell){--topbar:88px;--rail:92px;--sidebar:194px}
html body:has(#appShell) .topbar{position:relative;gap:12px;align-items:center;padding:8px 18px;background:#fff}
html body:has(#appShell) .brand{order:1;width:210px;min-width:0;flex:none;align-self:center;justify-content:center;padding:0;margin:0}
html body:has(#appShell) .avisphare-logo{display:block;width:210px;height:auto;max-height:62px;object-fit:contain}
html body:has(#appShell) .brand-copy{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html body:has(#appShell) #adminWord{position:absolute;left:21px;bottom:4px;font-size:10px;letter-spacing:.2em;padding:0;line-height:1;color:#687780}
html body:has(#appShell) .global-search{order:3;flex:1 1 360px;min-width:140px;height:40px;max-width:650px;border-radius:25px;border:1px solid #d3dce3;background:linear-gradient(#fff,#f4f7f9 70%,#fff);box-shadow:inset 0 1px 2px #fff,inset 0 -1px 1px #a7bac333,0 2px 4px #56718114}
html body:has(#appShell) .topbar .top-actions{order:4;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0;margin-left:auto;min-width:0}
html body:has(#appShell) .topbar .avis-trigger{height:34px;min-width:0;padding:0 9px;border-color:#dce4e9;border-radius:20px;color:#495b68;background:linear-gradient(#fff,#eef4f7);box-shadow:inset 0 1px 1px #fff,0 2px 5px #56718113;font-size:11px;white-space:nowrap}
html body:has(#appShell) .topbar .pulse{background:#bac8d2;box-shadow:0 0 0 3px #e8eef3}
html body:has(#appShell) .topbar .profile-copy{max-width:95px}
html body:has(#appShell) .topbar .profile-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
html body:has(#appShell) :is(.topbar,#mailToolsList) .avis-account-switch{display:inline-flex;align-items:center;gap:10px;margin:0;padding:0;flex:none;background:transparent;border:0}
html body:has(#appShell) :is(.topbar,#mailToolsList) .avis-account-side{display:inline-flex;align-items:center;gap:5px;padding:0;min-height:38px;background:transparent;color:#263742;font-size:11px;line-height:1;box-shadow:none;text-decoration:none}
html body:has(#appShell) :is(.topbar,#mailToolsList) .avis-account-side[aria-current]{background:transparent;box-shadow:none;text-decoration:none}
/* Exact approved artwork: a clear oval lens over frameless colour light. No fabricated knob. */
html body:has(#appShell) :is(.topbar,#mailToolsList) .avis-account-light{display:block;position:relative;flex:none;width:48px;height:28px;border:0;border-radius:0;background-color:transparent;background-image:url("./status-lights.webp");background-size:118px 55.76px;background-position:-61px -13px;background-repeat:no-repeat;box-shadow:none}
html body:has(#appShell) :is(.topbar,#mailToolsList) .avis-account-light[data-on]{background-image:url("./status-lights.webp");background-size:118px 55.76px;background-position:-10px -13px;background-color:transparent;border:0;box-shadow:none}
html body:has(#appShell) :is(.topbar,#mailToolsList) .avis-account-light::after{content:none}
html body:has(#appShell) .app-rail{padding:14px 6px 12px;gap:9px;background:#fff;align-items:center;overflow-y:auto;border-right:1px solid #e4ebf0}
html body:has(#appShell) .avis-glass-column{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;width:78px;flex:none;padding:3px 0;--beam-top:0px;--beam-opacity:0;border:1px solid #cfdce5;border-radius:8px;background:linear-gradient(90deg,#dce8ef66,#fff9 5%,#e8f0f544 24%,#ffffff7a 56%,#dce8ef55 92%,#fff 98%);box-shadow:inset 0 1px 2px #fff,inset 1px 0 1px #fff,inset -1px 0 2px #a9bfce44,0 3px 7px #567a901c}
html body:has(#appShell) .avis-glass-column:not(:has(.rail-item:not([hidden],[data-nav-off]))){display:none}
html body:has(#appShell) .avis-glass-column::before{content:"";position:absolute;z-index:0;pointer-events:none;top:var(--beam-top);bottom:3px;left:2px;right:2px;border-radius:6px;background:linear-gradient(90deg,#fff0,#fff 45%,#ffffffe6 56%,#fff0);box-shadow:0 0 5px #fff;opacity:var(--beam-opacity);transition:top .25s ease,opacity .15s ease}
html body:has(#appShell) .avis-glass-column::after{content:"";position:absolute;z-index:1;pointer-events:none;inset:1px;border-radius:7px;border:1px solid transparent;background:linear-gradient(#fff0,#fff0) padding-box,linear-gradient(160deg,#ffffffa3,#b7e8ff55 25%,#e3d6fa44 41%,#fff2ca55 64%,#c4f2e944 79%,#fff9) border-box;opacity:calc(.3 + var(--beam-opacity)*.4)}
html body:has(#appShell) .avis-glass-wave{position:absolute;top:var(--beam-top);bottom:3px;left:2px;right:2px;overflow:hidden;border-radius:6px;pointer-events:none;z-index:1}
html body:has(#appShell) .avis-glass-wave::after{content:"";position:absolute;left:0;right:0;height:50px;top:-50px;background:radial-gradient(ellipse,#fff,#ffffffbb 40%,#ffffff00 73%);opacity:0}
html body:has(#appShell) .avis-glass-column[data-glass-pulse] .avis-glass-wave::after{animation:avis-white-glass-wave .85s ease-out 1}
@keyframes avis-white-glass-wave{0%{top:-50px;opacity:0}15%{opacity:1}80%{opacity:.6}100%{top:100%;opacity:0}}
html body:has(#appShell) .app-rail .rail-item{position:relative;z-index:2;flex:none;min-height:56px;height:56px;width:74px;gap:0;padding:0;border:0;border-radius:12px;background:transparent;color:#506776;box-shadow:none}
html body:has(#appShell) .app-rail .rail-item img{display:block;width:64px;height:64px;object-fit:contain;filter:none}
html body:has(#appShell) .app-rail .rail-item.active{background:transparent;border:0;box-shadow:none}
html body:has(#appShell) .rail-end{margin-top:auto}
html body:has(#appShell) :is(.rail-item,.landing-home,.letter-creator-launcher):is(:active,[data-avis-press],[data-glass-selected]) img{filter:drop-shadow(0 1px 1px #607b8c66)!important}
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:none!important;box-shadow:inset 0 1px 2px #fff,0 0 0 1px #b1ccd999,0 2px 9px #b9ddeb66!important}
html body:has(#appShell) .mail-nav{padding:17px 13px;background:#fff}
html body:has(#appShell) .nav-label{margin-left:11px;color:#8997a0}
html body:has(#appShell) .folder-item{min-height:35px;margin:0 0 6px;padding:7px 12px;border:1px solid #e0e7ec;border-radius:24px;background:linear-gradient(#fff,#f1f5f8 70%,#fff);box-shadow:inset 0 1px 1px #fff,0 3px 6px #627d9114;color:#4c6272;font-size:13px}
html body:has(#appShell) .folder-item.active{color:#263945;border-color:#dbe7ee;background:#fff;box-shadow:inset 0 1px 2px #fff,0 0 8px 3px #fff,0 3px 9px #627d9126}
html body:has(#appShell) .avis-glass-caption{font-size:11px;line-height:1.4;max-width:88px}
html body:has(#appShell) .compose-button-icon{width:100%;height:34px;margin:0 0 10px;border:1px solid #dde6ed;border-radius:8px;padding:0;background:linear-gradient(#fff,#f2f6f9);box-shadow:0 2px 6px #627d9115;color:#5b7080}
html body:has(#appShell) .compose-icon{display:none}
html body:has(#appShell) .compose-button-icon::after{content:"New message";font-size:12px}
html body:has(#appShell) .message-card{border-radius:18px;border-color:#e2e8ed;box-shadow:0 3px 9px #5b73870d;background:#fff}
html body:has(#appShell) .message-card.selected{background:#fdfefe;border-color:#cddfe9;box-shadow:inset 0 1px 2px #fff,0 0 9px #fff}
@media(min-width:1100px){html body:has(#appShell) .mail-workspace:not([data-list]){grid-template-columns:minmax(340px,48%) minmax(0,1fr)}}
@media(max-width:1100px) and (min-width:701px){html body:has(#appShell) .brand{width:160px}html body:has(#appShell) .avisphare-logo{width:160px}html body:has(#appShell) .topbar{gap:8px}html body:has(#appShell) .topbar .top-actions{gap:5px}html body:has(#appShell) .topbar .avis-trigger{padding:0 6px;font-size:10px}html body:has(#appShell) :is(.topbar,#mailToolsList) .avis-account-switch{gap:6px}html body:has(#appShell) :is(.topbar,#mailToolsList) .avis-account-side{gap:3px;font-size:10px}html body:has(#appShell) .topbar .profile-copy{max-width:65px}}
@media(max-width:700px){html body:has(#appShell){--topbar:145px;--rail:78px;--sidebar:170px}html body:has(#appShell) .topbar{flex-wrap:wrap;align-content:center;gap:5px;padding:7px 9px}html body:has(#appShell) .brand{width:124px;padding:0;justify-content:flex-start}html body:has(#appShell) .avisphare-logo{width:124px}html body:has(#appShell) #adminWord{position:static;order:2;font-size:8px;line-height:1.3;max-width:60px}html body:has(#appShell) .topbar .top-actions{order:4;flex:1 1 100%;gap:7px;justify-content:flex-end}html body:has(#appShell) .global-search{order:5;flex:1 1 100%;height:34px;min-width:0;margin:0;max-width:none}html body:has(#appShell) :is(.topbar,#mailToolsList) .avis-account-side{font-size:10px;gap:3px;min-height:28px}html body:has(#appShell) :is(.topbar,#mailToolsList) .avis-account-switch{gap:6px}html body:has(#appShell) .topbar .profile-copy{max-width:70px}html body:has(#appShell) .topbar .profile-copy strong{font-size:10px}html body:has(#appShell) .topbar .avis-trigger{font-size:10px;padding:0 7px;height:30px}html body:has(#appShell) .topbar .top-actions .icon-button{width:30px;height:30px}html body:has(#appShell) .app-rail{padding-inline:2px}html body:has(#appShell) .avis-glass-column{width:70px}html body:has(#appShell) .app-rail .rail-item{width:66px}html body:has(#appShell) .mail-nav{padding:12px 10px}html body:has(#appShell) .folder-item{font-size:13px}}
@media(prefers-reduced-motion:reduce){html body:has(#appShell) .avis-glass-column::before,html body:has(#appShell) .avis-account-light{transition:none}html body:has(#appShell) .avis-glass-column[data-glass-pulse] .avis-glass-wave::after{animation:none}}
/* Preserve the phone's horizontal navigation rather than putting a tall glass column off screen. */
@media(max-width:700px){html body:has(#appShell) .app-rail{height:calc(78px + env(safe-area-inset-bottom));flex-direction:row;justify-content:flex-start;align-items:center;overflow-x:auto;overflow-y:hidden;padding:4px 6px env(safe-area-inset-bottom);gap:8px}html body:has(#appShell) .avis-glass-column{flex-direction:row;width:max-content;height:64px;padding:0 3px}html body:has(#appShell) .avis-glass-column .rail-item{width:58px;height:60px;min-height:60px}html body:has(#appShell) .avis-glass-column::before,html body:has(#appShell) .avis-glass-wave{display:none}html body:has(#appShell) .rail-end{margin-top:0;margin-left:auto}}
/* Existing mail toolbar actions keep their handlers and gain the approved thin glass surface. */
html body:has(#appShell) .list-header .icon-button{width:36px;height:36px;flex:none;border:1px solid #dce5eb;border-radius:12px;background:linear-gradient(150deg,#fff,#edf3f7 68%,#fff);box-shadow:inset 0 1px 2px #fff,inset 0 -1px 2px #a9bdca33,0 3px 7px #5b75881a;color:#637b8c}
html body:has(#appShell) .list-header .icon-button svg{filter:drop-shadow(0 1px 0 #fff)}

/* Light lives around the glass edges; the icon and text keep their contrast. */
html body:has(#appShell) .avisphare-close{order:5;flex:none;width:36px;height:36px;border:0;border-radius:0;background:transparent;color:#4c6575;box-shadow:none}
html body:has(#appShell) .avisphare-close svg{width:20px;height:20px}
html body:has(#appShell) .app-rail .rail-item:is([data-glass-selected],:focus-visible)::after{content:"";position:absolute;inset:1px 6px;border:1px solid #a8c9da;border-radius:13px;pointer-events:none;background:linear-gradient(130deg,#d4f1ff28,#fff0 40%,#e6d7ff25 80%,#fff5d52b);box-shadow:inset 0 0 0 1px #fff,0 0 3px #fff,0 2px 9px #b4dce980}
html body:has(#appShell) .app-rail .rail-item[data-glass-selected]::before{content:"";position:absolute;width:3px;height:19px;left:3px;top:18px;border-radius:3px;background:#8cb9ce;box-shadow:0 0 4px #fff,0 0 7px #abd9ed}
html body:has(#appShell) :is(.folder-item,.compose-button-icon,.list-select){position:relative;isolation:isolate;border:1px solid #d9e5eb99;border-radius:8px;background:linear-gradient(120deg,#fff9,#e4eff538 42%,#fff8 63%,#e7f0f547);box-shadow:inset 0 1px 2px #fff,inset 0 -1px 1px #c3d5df55,0 2px 5px #66829512;color:#405a6b;transition:background .18s,box-shadow .18s,border-color .18s}
html body:has(#appShell) .list-select{min-height:34px;padding:6px 16px;font:inherit;font-size:12px}
html body:has(#appShell) :is(.folder-item,.compose-button-icon,.list-select):is(:hover,:focus-visible,.active,[aria-pressed=true]){background:linear-gradient(115deg,#d7f1ff59,#fff9 35%,#ede3ff3b 72%,#fff0db55);border-color:#adcad9;box-shadow:inset 0 1px 2px #fff,inset 0 -1px 1px #b4cfdc66,0 0 0 1px #fff,0 2px 9px #b5dcea66;color:#263f50}
html body:has(#appShell) .folder-item.active::after{content:"";position:absolute;inset:7px auto 7px 3px;width:3px;border-radius:3px;background:#a2c9d9;box-shadow:0 0 4px #fff;pointer-events:none}
html body:has(#appShell) .security-window-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;position:sticky;top:0;z-index:3;padding:8px 14px;background:#fffffff2;border-bottom:1px solid #e1eaf0}
html body:has(#appShell) #securityClose{width:34px;height:34px;font-size:24px;color:#4c6575}
body.embed-settings :is(.topbar,.app-rail,.mail-nav,.app-header-menu,.mobile-scrim){display:none!important}
body.embed-settings #appShell{grid-template:minmax(0,1fr)/minmax(0,1fr);height:100dvh}
body.embed-settings .main-surface{grid-column:1;grid-row:1;min-width:0;overflow:auto}
body.embed-settings #securityView{height:100%;overflow:auto}
body.embed-settings.embed-in-page .security-window-bar{display:none}
@media(max-width:700px){html body:has(#appShell) .avisphare-close{order:3;margin-left:auto;width:32px;height:32px}html body:has(#appShell) .app-rail .rail-item[data-glass-selected]::before{top:21px}}
@media(prefers-reduced-motion:reduce){html body:has(#appShell) :is(.folder-item,.compose-button-icon,.list-select){transition:none}}
