/* ASBMail: a Gmail-style webmail in the ASBData Lite colours (indigo + cyan). */
:root { --navy:#1D2178; --blue:#2A2FA0; --accent:#29B6E8; --cyan:#5FCFF5; --grad:linear-gradient(135deg,#29B6E8 0%,#2A2FA0 100%); --accent-soft:#DDF1FC; --bg:#F2F8FE; --panel:#fff; --line:#DCE9F5; --ink:#0C1B2E; --muted:#5C6E85; --hover:#EAF3FC; --sel:#D3E8FA; --unread-bg:#fff; --read-bg:#EEF5FC; --red:#d93025; --shadow:0 1px 3px rgba(29,33,120,.16), 0 4px 10px rgba(29,33,120,.09); }
@media (prefers-color-scheme: dark) { :root { --bg:#0A1020; --panel:#111A2E; --line:#223250; --ink:#E6EEF8; --muted:#97A8C2; --hover:#18233B; --sel:#1D3A6E; --unread-bg:#111A2E; --read-bg:#0E1626; --accent-soft:#17306A; --blue:#7FB6FF; --shadow:0 1px 3px rgba(0,0,0,.55); } }
* { box-sizing: border-box; }
html, body { height: 100%; }
body.wm { margin: 0; font: 14px/1.45 "Google Sans", Roboto, "Segoe UI", system-ui, Arial, sans-serif; color: var(--ink); background: var(--bg); -webkit-tap-highlight-color: transparent; }
svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
a { color: var(--blue); }
button { font: inherit; color: inherit; cursor: pointer; }
.ib { width: 40px; height: 40px; border: 0; background: none; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); text-decoration: none; padding: 0; }
.ib:hover { background: var(--hover); color: var(--ink); }
.ib.off { opacity: .35; pointer-events: none; }
.ib svg { width: 20px; height: 20px; }
.grow { flex: 1; }
.muted { color: var(--muted); }

/* ---- top bar ---- */
.top { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 16px 0 8px; background: var(--bg); }
.brand { display: flex; align-items: center; text-decoration: none; min-width: 232px; }

.brand img { height: 26px; width: auto; display: block; }   /* the logo already contains the word Mail */
.search { flex: 1; max-width: 720px; height: 48px; display: flex; align-items: center; background: #E3EFFA; border-radius: 24px; padding: 0 4px; transition: background .15s, box-shadow .15s; }
@media (prefers-color-scheme: dark) { .search { background: #18233B; } }
.search:focus-within { background: var(--panel); box-shadow: var(--shadow); }
.search input[type=search] { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 16px; color: var(--ink); padding: 0 4px; -webkit-appearance: none; }
.top > .who { margin-left: auto; position: relative; }
.avatar, .av { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 600; font-size: 14px; border: 0; flex: none; }
.avatar.big { width: 72px; height: 72px; font-size: 28px; margin-bottom: 8px; }
.pop { position: absolute; right: 0; top: 46px; width: 300px; background: var(--panel); border-radius: 18px; box-shadow: var(--shadow); padding: 22px 18px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.pop[hidden] { display: none; }
.pop small { color: var(--muted); margin-bottom: 14px; word-break: break-all; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 18px; padding: 8px 18px; font-weight: 500; color: var(--ink); }
.pill:hover { background: var(--hover); }
.pill svg { width: 18px; height: 18px; }

/* ---- layout ---- */
.shell { display: flex; align-items: flex-start; min-height: calc(100vh - 64px); }
.side { width: 256px; flex: none; padding: 8px 12px 24px 0; position: sticky; top: 64px; max-height: calc(100vh - 64px); overflow-y: auto; }
.compose-btn { display: flex; align-items: center; gap: 14px; height: 56px; margin: 4px 0 14px 8px; padding: 0 24px 0 16px; border: 0; border-radius: 16px; background: var(--accent-soft); color: var(--navy); font-size: 15px; font-weight: 600; box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .compose-btn { color: #cfe0ff; } }
.compose-btn:hover { box-shadow: 0 2px 6px rgba(37,45,56,.3), 0 6px 14px rgba(37,45,56,.14); }
.nav-item { display: flex; align-items: center; gap: 18px; height: 32px; padding: 0 12px 0 26px; border-radius: 0 16px 16px 0; color: var(--ink); text-decoration: none; margin: 1px 0; }
.nav-item:hover { background: var(--hover); }
.nav-item.on { background: var(--sel); font-weight: 700; color: var(--navy); }
@media (prefers-color-scheme: dark) { .nav-item.on { color: #fff; } }
.nav-item svg { width: 20px; height: 20px; }
.nav-item span { flex: 1; }
.nav-item em { font-style: normal; font-size: 12px; font-weight: 700; }
.side-foot { margin: 22px 18px 0; font-size: 11px; color: var(--muted); }
.main { flex: 1; min-width: 0; padding: 0 16px 16px 0; }
.scrim { display: none; }
.note { margin: 0 0 10px; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.note.ok { background: #e3f5ea; color: #0b6b35; } .note.warn { background: #fdecc8; color: #7a4b00; } .note.info { background: var(--accent-soft); color: var(--ink); margin: 6px 0 10px; }
@media (prefers-color-scheme: dark) { .note.ok { background: #12392a; color: #8ee0b0; } .note.warn { background: #4b3a12; color: #ffd98a; } }

/* ---- list ---- */
.list-card, .reader { background: var(--panel); border-radius: 16px; min-height: calc(100vh - 80px); overflow: clip; }
.bar { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border-bottom: 1px solid var(--line); min-height: 52px; position: sticky; top: 64px; background: var(--panel); z-index: 5; }
.bulk { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--line); }
.bulk[hidden] { display: none; }
.range { color: var(--muted); font-size: 12px; margin-right: 8px; white-space: nowrap; }
.crumb { padding: 10px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.chk { display: inline-grid; place-items: center; width: 40px; height: 40px; cursor: pointer; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk span { width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 3px; display: grid; place-items: center; }
.chk input:checked + span { background: var(--blue); border-color: var(--blue); }
.chk input:checked + span::after { content: ""; width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px,-1px); }
.row { display: grid; grid-template-columns: 40px 32px 200px 1fr auto auto; align-items: center; gap: 4px; height: 40px; padding: 0 16px 0 8px; border-bottom: 1px solid var(--line); background: var(--read-bg); cursor: pointer; font-size: 14px; }
.row.unread { background: var(--unread-bg); font-weight: 700; }
.row:hover { box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); z-index: 1; position: relative; }
.row.picked { background: var(--sel); }
.row .av { display: none; }
.row .star { border: 0; background: none; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); padding: 0; border-radius: 50%; }
.row .star svg { width: 20px; height: 20px; } .row .star.on { color: #f4b400; }
.row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 12px; text-align: left; margin: 0; }
.row .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .subj { font-weight: inherit; }   /* bold only while the message is unread */
.row .snip { color: var(--muted); font-weight: 400; }
.row .clip { width: 18px; height: 18px; color: var(--muted); margin: 0 8px; }
.row .when { font-size: 12px; padding-left: 12px; white-space: nowrap; font-weight: 700; color: var(--ink); }
.row:not(.unread) .when { font-weight: 400; color: var(--muted); }
.empty { padding: 90px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 96px; height: 96px; opacity: .25; }

/* ---- reading ---- */
.reader { padding-bottom: 28px; }
.reader .bar { position: static; }
.subject { font-size: 22px; font-weight: 400; margin: 18px 24px 8px 72px; line-height: 1.3; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip { font-size: 12px; background: var(--hover); color: var(--muted); padding: 2px 8px; border-radius: 6px; }
.from { display: flex; align-items: flex-start; gap: 16px; padding: 8px 24px 4px 20px; }
.av.lg { width: 40px; height: 40px; font-size: 16px; }
.from .who { flex: 1; min-width: 0; }
.addr, .to-line, .when { color: var(--muted); font-size: 12px; }
.to-line { border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 2px; max-width: 100%; text-align: left; }
.to-line svg { width: 14px; height: 14px; }
.details { display: grid; grid-template-columns: 50px 1fr; gap: 2px 8px; margin: 8px 0 4px; font-size: 12px; background: var(--hover); border-radius: 8px; padding: 10px 12px; }
.details[hidden] { display: none; }
.details dt { color: var(--muted); text-align: right; } .details dd { margin: 0; word-break: break-word; }
.body-frame { display: block; width: calc(100% - 96px); margin: 8px 24px 0 72px; border: 0; min-height: 120px; background: #fff; border-radius: 6px; }
.reader .note { margin-left: 72px; margin-right: 24px; }
.atts { margin: 22px 24px 0 72px; border-top: 1px solid var(--line); padding-top: 14px; }
.atts h2 { font-size: 14px; font-weight: 500; margin: 0 0 10px; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.att { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
.att:hover { background: var(--hover); }
.att-thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--hover); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--blue); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-meta b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-meta small { color: var(--muted); }
.att-dl { width: 20px; height: 20px; color: var(--muted); }
.replies { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 24px 0 72px; }
.replies .pill { border-radius: 20px; padding: 10px 22px; }

/* ---- compose ---- */
.composer { position: fixed; right: 24px; bottom: 0; width: 560px; max-width: 100vw; height: 560px; max-height: calc(100vh - 20px); z-index: 60; background: var(--panel); border-radius: 12px 12px 0 0; box-shadow: 0 8px 10px 1px rgba(0,0,0,.16), 0 3px 14px 2px rgba(0,0,0,.12), 0 5px 5px -3px rgba(0,0,0,.2); display: flex; flex-direction: column; }
.composer[hidden] { display: none; }
.composer.min { height: 40px; } .composer.min .c-body, .composer.min .c-foot { display: none; }
.composer.max { right: 5vw; left: 5vw; width: auto; height: 90vh; bottom: 5vh; border-radius: 12px; }
.c-head { height: 40px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 16px; background: var(--navy); color: #fff; border-radius: 12px 12px 0 0; font-size: 14px; font-weight: 500; cursor: pointer; }
.composer.max .c-head { border-radius: 12px 12px 0 0; }
.c-head .ib { color: #d7def0; width: 32px; height: 32px; } .c-head .ib:hover { background: rgba(255,255,255,.14); color: #fff; }
.c-tools { display: inline-flex; align-items: center; }
.c-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 16px; overflow-y: auto; }
.c-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); min-height: 40px; }
.c-row label { color: var(--muted); width: 28px; flex: none; }
.c-row input { flex: 1; border: 0; outline: none; background: none; font-size: 14px; color: var(--ink); height: 38px; min-width: 0; }
.c-row[hidden] { display: none; }
.link { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 4px; }
.link:hover { text-decoration: underline; }
.editor { flex: 1; min-height: 180px; outline: none; padding: 12px 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.editor blockquote { margin: 0 0 0 .8ex; border-left: 2px solid #c9d1e3; padding-left: 1ex; color: var(--muted); }
.editor img { max-width: 100%; }
.c-files { list-style: none; margin: 0; padding: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.c-files li { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 16px; padding: 3px 4px 3px 12px; font-size: 12px; max-width: 100%; }
.c-files li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.c-files li button { border: 0; background: none; width: 22px; height: 22px; border-radius: 50%; padding: 0; display: grid; place-items: center; color: var(--muted); }
.c-files li button:hover { background: var(--hover); } .c-files svg { width: 14px; height: 14px; }
.c-foot { flex: none; display: flex; align-items: center; gap: 4px; padding: 10px 12px; }
.send { border: 0; background: var(--grad); color: #fff; font-weight: 600; font-size: 14px; border-radius: 18px; padding: 0 26px; height: 36px; margin-right: 8px; }
.send:hover { box-shadow: var(--shadow); filter: brightness(1.08); }
.send[disabled] { opacity: .6; cursor: wait; }
.send.wide { width: 100%; height: 44px; border-radius: 22px; margin: 6px 0 0; }
.fmt { display: inline-flex; align-items: center; }
.c-state { flex: 1; text-align: right; font-size: 12px; color: var(--muted); padding-right: 6px; }
.only-m { display: none; }

.fab { display: none; }
.toast { position: fixed; left: 24px; bottom: 24px; z-index: 90; background: #202124; color: #fff; padding: 12px 20px; border-radius: 6px; box-shadow: var(--shadow); max-width: calc(100vw - 48px); }
.toast[hidden] { display: none; }
.toast.err { background: #8c1d18; }

/* ---- spinners and loading feedback ---- */
@keyframes wm-spin { to { transform: rotate(360deg); } }
@keyframes wm-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .15s; }
.topbar.on { opacity: 1; }
.topbar::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, var(--blue), var(--accent)); border-radius: 0 3px 3px 0; animation: wm-bar 1.1s ease-in-out infinite; }

/* icon buttons: the icon is replaced by a spinning ring */
.ib.busy { position: relative; color: var(--blue); }
.ib.busy svg { opacity: 0; }
.ib.busy::after { content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: wm-spin .7s linear infinite; }
.c-head .ib.busy { color: #fff; }
.c-head .ib.busy.send-m { color: var(--blue) !important; }

/* text buttons: a small ring before the label */
.send.busy::before, .pill.busy::before { content: ""; display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: wm-spin .7s linear infinite; vertical-align: -2px; }
.send.busy::before { margin-right: 8px; }
.pill.busy svg { display: none; }
.send.busy, .send.busy[disabled] { opacity: 1; cursor: progress; }
.pill.busy { cursor: progress; }

/* folder in the side menu and message row that was just opened */
.nav-item.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid var(--blue); border-right-color: transparent; border-radius: 50%; animation: wm-spin .7s linear infinite; }
.nav-item.loading em { display: none; }
.row.loading { position: relative; background: var(--sel); cursor: progress; }
.row.loading::after { content: ""; position: absolute; top: 50%; right: 18px; width: 16px; height: 16px; margin-top: -8px; border: 2px solid var(--blue); border-right-color: transparent; border-radius: 50%; animation: wm-spin .7s linear infinite; }
.row.loading .when { visibility: hidden; }

/* "Saving..." / "Sending..." text in the writer */
.c-state.busy::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: wm-spin .7s linear infinite; vertical-align: -1px; }

@media (max-width: 860px) {
  .row.loading::after { top: 14px; right: 14px; margin-top: 0; }
}
/* people who asked their device for less motion still get a spinner, just a calmer one */
@media (prefers-reduced-motion: reduce) {
  .ib.busy::after, .send.busy::before, .pill.busy::before, .nav-item.loading::after, .row.loading::after, .c-state.busy::before { animation-duration: 1.8s; }
  .topbar::before { animation-duration: 2.4s; }
}

/* ---- sign in ---- */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: radial-gradient(120% 90% at 100% 0%, #3E86FF 0%, transparent 55%), linear-gradient(150deg, #1B1F7A, #1D2178 55%, #2B6BE6); }
.login-card { width: 100%; max-width: 400px; background: #fff; color: #1f2433; border-radius: 24px; padding: 40px 30px 28px; text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
/* sign-in card: the logo, then room to breathe, then the instruction */
.lockup { margin: 6px 0 0; line-height: 0; }
.lockup img { height: 38px; width: auto; max-width: 100%; display: inline-block; }
.add-h { margin: 22px 0 0; font-size: 18px; font-weight: 500; color: var(--navy); }
.login-card h1 { margin: 0; }
.login-card .muted { color: #5f6b85; margin: 22px 0 26px; font-size: 14px; line-height: 1.5; }
.add-h + .muted { margin-top: 8px; }
.fld { display: block; text-align: left; margin-bottom: 14px; }
.fld span { display: block; font-size: 12px; color: #5f6b85; margin-bottom: 4px; }
.fld input { width: 100%; height: 48px; border: 1px solid #c4cbda; border-radius: 10px; padding: 0 14px; font-size: 16px; background: #fff; color: #1f2433; }
.fld input:focus { outline: 2px solid var(--blue); border-color: transparent; }
.err { color: var(--red); font-size: 13px; text-align: left; margin: 0 0 8px; }
.login-card .foot { color: #5f6b85; font-size: 12px; margin: 22px 0 0; text-wrap: balance; }
.login-card .muted { text-wrap: balance; }

/* ---- phones: looks like the Gmail app ---- */
.side-brand { display: none; }
@media (max-width: 860px) {
  .top { height: auto; padding: 8px 8px 4px; background: var(--bg); position: sticky; }
  .brand { display: none; }
  .search { max-width: none; height: 48px; margin: 0; padding-left: 0; box-shadow: var(--shadow); background: var(--panel); order: 2; }
  .top #menuBtn { position: absolute; left: 12px; top: 14px; z-index: 2; }
  .search { padding-left: 44px; padding-right: 2px; } .search > button.ib { display: none; }
  .top > .who { order: 3; position: absolute; right: 14px; top: 14px; }
  .avatar { width: 32px; height: 32px; }
  .search { width: 100%; padding-right: 48px; }
  .shell { display: block; }
  .main { padding: 0; }
  .list-card, .reader { border-radius: 0; min-height: calc(100vh - 70px); }
  .side { position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; max-height: none; width: 285px; max-width: 86vw; background: var(--panel); padding-top: 16px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: none; }
  body.menu-open .side { transform: none; box-shadow: 4px 0 24px rgba(0,0,0,.35); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 65; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu-open .scrim { opacity: 1; pointer-events: auto; }
  .compose-btn { display: none; }
  .bar { top: 64px; padding: 2px 8px; min-height: 44px; } .bar .range { display: none; }
  .row { grid-template-columns: 44px 1fr auto; grid-template-areas: "av who when" "av msg star"; height: auto; min-height: 76px; padding: 10px 12px; row-gap: 1px; align-items: start; }
  .row .chk { display: none; }
  .row .av { display: inline-grid; grid-area: av; width: 40px; height: 40px; margin-top: 2px; }
  .row .who { grid-area: who; font-size: 15px; padding: 0; }
  .row .when { grid-area: when; padding: 0; font-size: 12px; }
  .row .msg { grid-area: msg; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: 14px; line-height: 1.35; }
  .row .snip { display: block; }
  .row .star { grid-area: star; justify-self: end; margin-top: -2px; }
  .row .clip { display: none; }
  .row.picked { background: var(--sel); } .row.picked .av { background: var(--blue) !important; font-size: 0; } .row.picked .av::after { content: "✓"; font-size: 20px; }
  .subject { margin: 12px 16px 6px; font-size: 19px; }
  .from { padding: 6px 12px; }
  .body-frame { width: calc(100% - 24px); margin: 8px 12px 0; }
  .reader .note, .atts, .replies { margin-left: 12px; margin-right: 12px; }
  .fab { display: flex; position: fixed; right: 16px; bottom: 16px; z-index: 40; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 16px; background: var(--accent-soft); color: var(--navy); font-weight: 600; font-size: 15px; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
  .composer { right: 0; left: 0; top: 0; bottom: 0; width: 100%; height: 100% !important; max-height: none; border-radius: 0; }
  .composer.max { left: 0; right: 0; width: 100%; height: 100% !important; bottom: 0; border-radius: 0; }
  .c-head { background: var(--panel); color: var(--ink); border-radius: 0; height: 56px; border-bottom: 1px solid var(--line); padding: 0 4px; }
  .c-head .ib { color: var(--muted); width: 40px; height: 40px; } .c-head .ib:hover { color: var(--ink); background: var(--hover); }
  #cTitle { flex: 1; padding-left: 8px; font-size: 18px; font-weight: 400; }
  .only-m { display: inline-grid; } .no-m { display: none !important; }
  .send-m { color: var(--blue) !important; }
  .c-foot .send { display: none; } .c-foot { padding: 6px 8px; } .fmt { overflow-x: auto; }
  .toast { left: 12px; right: 12px; bottom: 80px; }
}

@media (max-width: 860px) {
  .side-brand { display: flex; align-items: center; padding: 18px 20px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--navy, #252d38); }
  .side-brand img { height: 24px; width: auto; display: block; }
  .side .compose-btn { display: none; }
}

/* mobile drawer title in dark mode */
@media (prefers-color-scheme: dark) { .side-brand { color: #fff; } }

/* ---- several accounts, unread dots, notification prompt ---- */
.avatar .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #d93025; color: #fff; font: 700 11px/18px system-ui, sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.avatar .dot[hidden] { display: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.pop { max-height: calc(100vh - 80px); overflow-y: auto; gap: 6px; }
.pop form { width: 100%; display: flex; justify-content: center; }
.pop .pill { width: 100%; justify-content: center; text-decoration: none; }
.pop small { margin-bottom: 10px; }
.acct-row { border-top: 1px solid var(--line); padding-top: 6px; }
.acct-btn { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; border-radius: 12px; padding: 8px 10px; color: var(--ink); font-size: 14px; text-align: left; }
.acct-btn:hover { background: var(--hover); }
.acct-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-n { font-style: normal; font-weight: 700; font-size: 12px; background: #d93025; color: #fff; border-radius: 10px; padding: 1px 7px; }
.acct-n[hidden] { display: none; }
.keep { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; font-size: 14px; color: #1f2433; text-align: left; cursor: pointer; }
.keep input { width: 18px; height: 18px; accent-color: var(--blue); }

.notif-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; padding: 10px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); }
.notif-banner span { flex: 1; min-width: 200px; }
.notif-banner button { border: 0; border-radius: 16px; padding: 7px 16px; font-weight: 600; background: var(--navy); color: #fff; }
.notif-banner button.quiet { background: none; color: var(--muted); font-weight: 500; }
@media (prefers-color-scheme: dark) { .notif-banner button { background: var(--blue); } }
.newbar { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 80; border: 0; border-radius: 20px; padding: 9px 20px; background: var(--navy); color: #fff; font-weight: 600; box-shadow: var(--shadow); cursor: pointer; }
.newbar[hidden] { display: none; }
@media (prefers-color-scheme: dark) { .newbar { background: var(--blue); } }

/* Change password page */
.pw-card { background: var(--panel); border-radius: 16px; min-height: calc(100vh - 80px); overflow: clip; }
.pw-card .bar h1 { font-size: 18px; font-weight: 500; margin: 0 0 0 6px; }
.pw-body { max-width: 440px; padding: 22px 28px 32px; }
.pw-body > .muted { margin: 0 0 22px; line-height: 1.5; }
.pw-card .fld span { color: var(--muted); }
.pw-card .fld input { background: var(--panel); color: var(--ink); border-color: var(--line); }
.pw-card .keep { color: var(--ink); }
.pw-meter { height: 4px; border-radius: 2px; background: var(--line); margin: -8px 0 6px; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.pw-hint { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.pw-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 8px; }
.pw-actions .send { margin: 0; }
.pw-actions .pill { text-decoration: none; }
@media (max-width: 760px) { .pw-card { border-radius: 0; min-height: calc(100vh - 70px); } .pw-body { padding: 18px 16px 28px; } }

/* Profile pictures */
.avatar[data-pic], .av[data-pic] { color: transparent; }
.row.picked .av[data-pic] { color: #fff; }
.pic-btn { cursor: pointer; overflow: visible; }
.pic-btn .cam { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--panel); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); font-style: normal; }
.pic-btn .cam svg { width: 15px; height: 15px; }
.pic-btn:hover .cam { background: var(--hover); }
.pic-btn.busy::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,.35); }
.pic-btn.busy .cam svg { display: none; }
.pic-btn.busy .cam::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: wm-spin .7s linear infinite; }
.pic-links { font-size: 13px; margin: -8px 0 12px; color: var(--muted); }
.linkish { border: 0; background: none; padding: 0; color: var(--blue); font-size: 13px; }
.linkish:hover { text-decoration: underline; }

/* ---- administrator page (company domains) ---- */
.admin-page { overflow-y: auto; }
.adm-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.adm-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.adm-brand img { height: 26px; width: auto; display: block; }
.adm-brand span { font-size: 13px; color: var(--muted); padding: 3px 10px; border: 1px solid var(--line); border-radius: 12px; }
.adm-top form { margin: 0; }
.adm { max-width: 860px; margin: 0 auto; padding: 18px 16px 60px; display: grid; gap: 18px; }
.adm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 20px; box-shadow: var(--shadow); }
.adm-card h2 { margin: 0 0 6px; font-size: 18px; }
.adm-card > .muted { margin: 0 0 14px; line-height: 1.55; }
.adm-card .fld span, .adm-card .fld em { color: var(--muted); font-style: normal; }
.adm-card .fld input, .adm-card .fld select { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 15px; background: var(--panel); color: var(--ink); }
.adm-card .fld input:focus, .adm-card .fld select:focus { outline: 2px solid var(--blue); border-color: transparent; }
.adm-card .keep { color: var(--ink); }
.adm-card .keep input { flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 110px auto; gap: 0 14px; align-items: end; }
.grid3 .keep { margin-bottom: 14px; }
.srv { border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px 4px; margin: 0 0 14px; min-width: 0; }
.srv legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.hint { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; line-height: 1.45; }
.adv { margin: 8px 0 14px; } .adv summary { cursor: pointer; color: var(--blue); font-weight: 500; padding: 6px 0; }
.adm-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.adm-actions .send { margin: 0; }
.dom-list { display: grid; gap: 10px; }
.dom { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--bg); }
.dom-main { min-width: 0; display: grid; gap: 2px; flex: 1; }
.dom-main b { font-size: 15px; } .dom-name { color: var(--blue); font-weight: 500; word-break: break-all; }
.dom-main small { color: var(--muted); word-break: break-word; }
.dom-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dom-actions .pill, .adm-actions .pill, .adm-top .pill { padding: 7px 14px; font-size: 13.5px; }
.pill.danger { color: var(--red); }
.dom-result { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; display: grid; gap: 4px; word-break: break-word; }
.dom-result.good { background: #e3f5ea; color: #0b6b35; } .dom-result.bad { background: #fdecc8; color: #7a4b00; }
@media (prefers-color-scheme: dark) { .dom-result.good { background: #12392a; color: #8ee0b0; } .dom-result.bad { background: #4b3a12; color: #ffd98a; } }
.login-card code { background: #eef3fb; padding: 2px 6px; border-radius: 6px; font-size: 13px; word-break: break-all; }
@media (max-width: 640px) {
  .grid2, .grid3 { grid-template-columns: 1fr; } .grid3 .keep { margin-top: -4px; }
  .dom { flex-direction: column; } .dom-actions { justify-content: flex-start; }
  .adm-card { padding: 18px 14px; } .adm-actions { justify-content: stretch; } .adm-actions .pill, .adm-actions .send { flex: 1; justify-content: center; }
}
.brand picture, .side-brand picture, .adm-brand picture { display: flex; align-items: center; }

/* admin header on phones: keep everything inside the screen */
.adm-top .pill { white-space: nowrap; }
@media (max-width: 560px) {
  .adm-top { padding: 8px 12px; gap: 6px; flex-wrap: wrap; }
  .adm-top .adm-brand span { display: none; }
  .adm-top .pill { padding: 6px 11px; font-size: 13px; }
}
