:root {
  --bg: #f9fbfd;
  --text: #1f1f1f;
  --muted: #5e5e5e;
  --icon: #444746;
  --line: #e1e3e1;
  --active: #d3e3fd;
  --blue: #0b57d0;
  --blue-deep: #0842a0;
  --compose: #c2e7ff;
  --selected: #c2e7ff;
  --danger: #b3261e;
  --star: #f4b400;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 2px 6px 2px rgba(0,0,0,.15);
  /* As Gmail: Google Sans everywhere (Google Sans Flex is its free version), Roboto if it cannot load. */
  font-family: "Google Sans Flex", "Google Sans", Roboto, Arial, Helvetica, sans-serif;
  /* Google Sans Flex widens small text by itself (optical size). Gmail's Google Sans
     matches it at size 24 at every text size, so keep that. */
  font-variation-settings: "opsz" 24;
}
/* UI_FONT=roboto in .env */
html[data-font="roboto"] { font-family: Roboto, Arial, Helvetica, sans-serif; font-variation-settings: normal; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-size: 14px;
  /* As Gmail: on a Mac this draws text a little lighter, so bold stands out as it does there. */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23444746' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px 18px;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  /* Each icon is one glyph, 1em wide. Until the font loads, the hidden word ("menu") must not push the layout. */
  max-width: 1em;
  overflow: hidden;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  user-select: none;
}
.material-symbols-outlined.fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

.icon-btn, .rail-btn, .avatar-btn {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--icon);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover, .rail-btn:hover, .avatar-btn:hover { background: rgba(68,71,70,.08); }
.icon-btn:disabled { opacity: 0.38; pointer-events: none; }
.tip {
  position: fixed; z-index: 80; pointer-events: none; white-space: nowrap;
  background: #3c4043; color: #fff; font-size: 12px; font-weight: 500; line-height: 16px;
  padding: 4px 8px; border-radius: 4px;
}

.topbar {
  height: 64px; display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px;
}
#menu-btn .material-symbols-outlined { font-size: 24px; }
.logo { display: flex; align-items: center; gap: 4px; text-decoration: none; color: #5f6368; min-width: 180px; }
.logo span { font-size: 20px; letter-spacing: .2px; }
.search {
  flex: 1; max-width: 720px; height: 46px; margin: 0 0 0 14px; background: #e9eef6;
  border-radius: 24px; display: flex; align-items: center; padding: 0 6px 0 12px; gap: 8px;
}
.search:focus-within, .search.search-open {
  background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.24); position: relative; z-index: 61;
}
.search.search-open { border-radius: 8px 8px 0 0; box-shadow: 0 1px 2px rgba(60,64,67,.3); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; min-width: 0; }
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search-clear {
  width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent;
  color: var(--icon); display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0;
}
.search-clear:hover { background: rgba(68,71,70,.08); }
.search-chip {
  display: inline-flex; align-items: center; gap: 2px; max-width: 280px; height: 28px;
  padding: 0 2px 0 10px; border-radius: 14px; background: #d3e3fd; color: #041e49;
  font-size: 14px; flex: none;
}
.search-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-chip button {
  width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent;
  color: #041e49; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none;
}
.search-chip button:hover { background: rgba(11, 87, 208, .12); }
.search-chip .material-symbols-outlined { font-size: 16px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.avatar-btn { width: 32px; height: 32px; color: #fff; font-weight: 500; margin-left: 4px; overflow: hidden; padding: 0; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

.workspace { height: calc(100vh - 64px); display: flex; min-height: 0; }
.sidebar { width: 256px; flex: none; padding-top: 8px; overflow: auto; display: flex; flex-direction: column; }
/* Compose, the system folders and More/Less stay put; only the folders under
   More scroll (Create folder stays below them). On a very short window the
   whole sidebar still scrolls. */
.sidebar > * { flex: none; }
.sidebar > .compose-btn { align-self: flex-start; }
.sidebar > .nav-more.open {
  flex: 0 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: thin;
}
.stage {
  flex: 1; min-width: 0; background: #fff; border-radius: 16px;
  margin: 0 8px 12px 0; display: flex; flex-direction: column; overflow: hidden;
}
.rail { width: 56px; display: flex; flex-direction: column; align-items: center; padding-top: 8px; gap: 8px; }
.rail-btn.on { background: rgba(26, 115, 232, .12); }
.rail-glyph { width: 20px; height: 20px; display: block; flex: none; }
.rail-glyph.cal {
  border-radius: 5px; background: linear-gradient(180deg, #4c8df5 0%, #1a73e8 100%);
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: -0.4px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 1px 2px rgba(26, 115, 232, .45);
}
.rail-glyph.person { position: relative; }
.rail-glyph.person::before,
.rail-glyph.person::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); }
.rail-glyph.person::before { width: 8px; height: 8px; top: 1px; border-radius: 50%; background: #1a73e8; }
.rail-glyph.person::after {
  width: 14px; height: 7px; bottom: 1px; border-radius: 7px 7px 4px 4px; background: #8ab4f8;
}

.compose-btn {
  margin: 0 16px 16px 8px; height: 50px; border: 0; border-radius: 15px;
  background: var(--compose); color: #001d35; padding: 0 22px 0 16px;
  display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.compose-btn:hover { box-shadow: var(--shadow); background: #b6daf8; }
.nav-item, .more-btn {
  width: calc(100% - 16px); height: 32px; border: 0; background: transparent;
  border-radius: 0 16px 16px 0; display: flex; align-items: center; gap: 12px;
  padding: 0 12px 0 26px; color: var(--text); text-align: left;
}
.nav-item:hover, .more-btn:hover,
.nav-row:hover .nav-item, .nav-row.menu-open .nav-item { background: rgba(32,33,36,.06); }
.nav-item.active, .nav-row:hover .nav-item.active, .nav-row.menu-open .nav-item.active { background: var(--active); font-weight: 600; }
.nav-item.has-unread { font-weight: 600; }
.nav-item .badge { margin-left: auto; font-size: 13px; font-weight: 600; }
.nav-row:hover:has(.nav-manage) .badge,
.nav-row:focus-within:has(.nav-manage) .badge,
.nav-row.menu-open .badge { visibility: hidden; }
.nav-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-row { position: relative; }
/* Folders under "More" as Gmail shows labels: every icon in the same column as
   the icons above, each level of subfolders 16px further in, and a small
   open/close arrow in the gap just left of the icon of a folder that has some. */
.nav-more .nav-item { padding-left: calc(28px + var(--depth, 0) * 16px); }
.nav-caret {
  position: absolute; left: calc(9px + var(--depth, 0) * 16px); top: 8px; z-index: 1;
  width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; background: transparent;
  color: var(--icon); display: inline-flex; align-items: center; justify-content: center;
}
.nav-caret:hover { background: rgba(32,33,36,.1); }
.nav-caret .material-symbols-outlined { font-size: 20px; font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20; }
.nav-item.nav-group { color: var(--text); }
.nav-manage {
  display: none; position: absolute; right: 18px; top: 2px; width: 28px; height: 28px;
  padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--icon);
  align-items: center; justify-content: center; z-index: 1;
}
.nav-row:hover .nav-manage, .nav-row:focus-within .nav-manage, .nav-row.menu-open .nav-manage { display: inline-flex; }
.nav-manage:hover { background: #e8eaed; }
.nav-row:hover:has(.nav-item.active) .nav-manage,
.nav-row:focus-within:has(.nav-item.active) .nav-manage,
.nav-row.menu-open:has(.nav-item.active) .nav-manage { background: #e8f0fe; }
.nav-row:hover:has(.nav-item.active) .nav-manage:hover,
.nav-row:focus-within:has(.nav-item.active) .nav-manage:hover,
.nav-row.menu-open:has(.nav-item.active) .nav-manage:hover { background: #d3e3fd; }
.nav-row:hover:has(.nav-manage) .nav-item,
.nav-row:focus-within:has(.nav-manage) .nav-item,
.nav-row.menu-open .nav-item { padding-right: 36px; }
.nav-section { color: #444746; font-weight: 500; padding: 14px 26px 6px; }
.trash-note {
  padding: 14px 24px; text-align: center; color: #444746; background: #f8fafd;
  border-bottom: 1px solid rgba(100, 121, 143, 0.12);
}
.cr-folder { margin-top: 8px;}
.trash-note button { border: 0; background: none; color: var(--blue); font: inherit; cursor: pointer; padding: 0; }
.trash-note button:hover { text-decoration: underline; }
.more-btn { color: var(--text); font-weight: 500; margin-top: 8px;}
.nav-more { display: none; }
.nav-more.open { display: block; }
.label-mark { width: 20px; height: 20px; flex: none; display: block; }
.label-mark path { fill: currentColor; }
.nav-add {
  display: none; width: 56px; height: 40px; margin: 0; padding: 0; border: 0;
  border-radius: 20px; background: transparent; color: #202124;
  align-items: center; justify-content: center;
}
.nav-add:hover { background: rgba(32,33,36,.06); }

.progress { height: 3px; overflow: hidden; background: #e8f0fe; }
.progress span { display: block; height: 100%; width: 40%; background: var(--blue); animation: slide 1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

.toolbar { height: 48px; display: flex; align-items: center; padding: 0 8px; gap: 2px; flex: none; }
.select-box { display: inline-flex; align-items: center; height: 40px; margin-left: 4px;}
.select-caret {
  width: 20px; height: 32px; padding: 0; border: 0; background: transparent; color: var(--icon);
  border-radius: 4px; display: inline-flex; align-items: center; justify-content: center;
}
.select-caret .material-symbols-outlined { font-size: 20px; }
.select-caret:hover { background: rgba(68,71,70,.08); }
.menu-check { width: 20px; height: 20px; flex: none; }
.toolbar .spacer { flex: 1; }
.page-label { color: var(--muted); font-size: 12px; margin-right: 8px; white-space: nowrap; }
.check { width: 14px; height: 14px; accent-color: var(--blue); }
.mail-tabs { display: flex; flex: none; align-items: stretch; height: 56px; gap: 8px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.mail-tab {
  flex: 0 0 auto; min-width: 180px; height: 100%; border: 0; border-bottom: 3px solid transparent;
  background: transparent; color: #444746; display: inline-flex; align-items: center;
  gap: 12px; padding: 0 20px; font-size: 14px; font-weight: 500;
}
.mail-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-tab:hover { background: rgba(32,33,36,.04); }
.mail-tab.on { color: var(--blue); border-bottom-color: var(--blue); }
.mail-tab .material-symbols-outlined { font-size: 20px; }

.list { overflow: auto; flex: 1; }
.row {
  display: grid; grid-template-columns: 28px 28px 28px minmax(120px, 200px) minmax(0, 1fr) 32px auto;
  align-items: center; height: 40px; padding: 0 8px 0 12px; position: relative; background: #f2f6fc;
  border-bottom: 1px solid rgba(100, 121, 143, 0.12);
}
.row:hover { box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); z-index: 1; }
.nav-item.drop-target, .mail-tab.drop-target { background: #d3e3fd; outline: 2px solid var(--blue); outline-offset: -2px; }
body.dragging-mail, body.dragging-mail .row { cursor: grabbing; user-select: none; }
.drag-ghost {
  position: fixed; z-index: 90; pointer-events: none; max-width: 280px;
  padding: 8px 12px; background: #fff; color: #1f1f1f; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(60,64,67,.28); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row.unread { background: #fff; }
.row.unread .sender, .row.unread .subject, .row.unread .date-label { font-weight: 600; color: #1f1f1f; }
.row.checked { background: var(--selected); }
.row.cursor { outline: 1px solid #d3e3fd; }
.sender, .subject-wrap { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.sender { padding-right: 30px; }
.snippet { color: var(--muted); font-weight: 400; }
.draft-tag { color: #d93025; font-weight: 600; margin-right: 6px; }
.date-cell { display: flex; align-items: center; justify-content: flex-end; min-width: 60px; gap: 2px; }
.date-label { color: var(--muted); font-size: 12px; }
.row.snoozed .date-cell { min-width: 148px; padding-left: 36px; }
.row.snoozed .date-label,
.row.unread.snoozed .date-label { color: #d93025; font-weight: 500; }
.row-actions { display: none; }
.row:hover .row-actions { display: flex; }
.row:hover .date-label { display: none; }
.star { border: 0; background: transparent; color: #c4c7c5; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.star.on { color: var(--star); }
.important { border: 0; background: transparent; color: #c4c7c5; width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.important .material-symbols-outlined { font-size: 18px; }
.important.on { color: var(--blue); }
.clip-cell { display: flex; align-items: center; justify-content: center; width: 32px; height: 28px; }
.clip { color: #5f6368; font-size: 18px; }
svg.clip-mark { display: block; }

.reader { overflow: auto; flex: 1; }
.reader-subject { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 400; padding: 12px 16px 4px 56px; }
.msg { padding: 8px 16px 12px; }
.msg.collapsed { display: flex; align-items: center; gap: 12px; height: 56px; cursor: pointer; border-top: 1px solid #f1f3f4; }
.msg.collapsed .snippet { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.collapsed:hover { background: #f6f8fc; }
.msg-head { display: flex; gap: 12px; align-items: flex-start; }
.msg-line { display: flex; align-items: center; gap: 12px; min-height: 28px; }
.who { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.msg-tools { display: flex; align-items: center; flex: none; }
.msg-tools .date-label { margin-right: 4px; line-height: 28px; }
.msg-tools .icon-btn, .msg-tools .star { width: 32px; height: 32px; }
.avatar, .avatar-lg {
  width: 40px; height: 40px; border-radius: 50%; color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 500; flex: none; text-transform: uppercase;
}
.avatar-lg { width: 72px; height: 72px; font-size: 28px; }
.msg-meta { flex: 1; min-width: 0; }
.msg-meta .name { font-weight: 600; }
.msg-meta .addr { color: var(--muted); font-weight: 400; }
.to-line { color: var(--muted); font-size: 12px; background: none; border: 0; padding: 0; }
.details {
  margin-top: 8px; background: #f6f8fc; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #3c4043;
}
.details div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; margin: 2px 0; }
.msg-body { margin: 12px 0 0 52px; }
.msg-body iframe { width: 100%; height: 0; border: 0; display: block; }
.attach-block { margin: 16px 0 4px 52px; padding-top: 10px; border-top: 1px dotted #dadce0; }
.attach-block.pending { display: none; }
.attach-head { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.attach-label { font-size: 14px; color: #202124; }
.attach-all { width: 32px; height: 32px; color: #5f6368; }
.attach-all:disabled { opacity: 0.45; }
.attach-all .material-symbols-outlined { font-size: 20px; }
.attach-label strong { font-weight: 600; }
.attach-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.attach-wrap { position: relative; width: 176px; height: 124px; flex: none; }
.attach {
  --att-fold: #4986e7;
  --att-fold-shade: #c9c9c9;
  --att-fold-size: 20px;
  position: relative; width: 100%; height: 100%; border: 1px solid #dadce0;
  background: #fff; color: inherit; font: inherit; text-align: left; padding: 0;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--att-fold-size)),
    calc(100% - var(--att-fold-size)) 100%,
    0 100%
  );
}
.attach:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.attach-sheet { position: absolute; inset: 0; pointer-events: none; }
.attach img, .attach .pdf-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
  object-fit: cover; background: #f8f9fa; pointer-events: none;
}
.attach-page {
  position: absolute; z-index: 1; left: 0; right: 0; top: 4px; bottom: 36px;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.attach-page svg { width: 36px; height: 44px; display: block; }
.attach-foot {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 36px;
  display: flex; align-items: center; gap: 8px; padding: 0 40px 0 10px;
  background: #f1f3f4; border-top: 1px solid #dadce0;
}
.attach-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; color: #202124; }
.type-badge {
  flex: none; height: 16px; min-width: 16px; padding: 0 3px; border-radius: 2px;
  font-size: 8px; font-weight: 700; letter-spacing: 0; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.type-ico { flex: none; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; color: #5f6368; }
.type-ico .material-symbols-outlined { font-size: 18px; }
.attach-fold {
  position: absolute; z-index: 8; right: -1px; bottom: -1px; display: block;
  width: calc(var(--att-fold-size) * 2); height: var(--att-fold-size); pointer-events: none;
}
.att-fold-shade { fill: var(--att-fold-shade); }
.att-fold-front { fill: var(--att-fold); }
.attach-hover {
  position: absolute; z-index: 3; inset: 0; display: flex; flex-direction: column; opacity: 0; pointer-events: none;
  padding: 8px 10px 44px;
}
.attach-image .attach-hover { background: rgba(32, 33, 36, .84); color: #fff; justify-content: flex-end; }
.attach-file .attach-hover { background: rgba(248, 249, 250, .97); color: #202124; justify-content: flex-start; }
.attach-hover-top, .attach-hover-copy { width: 100%; }
.attach-wrap:hover .attach-hover, .attach-wrap:focus-within .attach-hover { opacity: 1; }
.attach-wrap:hover .attach-foot, .attach-wrap:hover .attach-page { opacity: 0; }
.attach-hover-top { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.attach-hover-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attach-hover-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13px; font-weight: 500; line-height: 1.25; word-break: break-word;
}
.attach-hover-size { font-size: 12px; color: #5f6368; }
.attach-image .attach-hover-size { color: rgba(255,255,255,.82); }
.attach-hover .type-badge { height: 22px; min-width: 22px; font-size: 9px; }
.attach-hover .type-ico, .attach-hover .type-ico .material-symbols-outlined { width: 22px; height: 22px; font-size: 22px; }
.attach-dl {
  position: absolute; z-index: 5; left: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%;
  background: #5f6368; color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; text-decoration: none;
}
.attach-dl .material-symbols-outlined { font-size: 18px; color: #fff; }
.attach-wrap:hover .attach-dl, .attach-wrap:focus-within .attach-dl { opacity: 1; }
.attach-dl:hover { background: #3c4043; }
.dialog.eml-window { width: min(920px, 94vw); max-height: min(860px, 90vh); overflow: auto; padding: 16px 20px 20px; border-radius: 12px; }
.eml-head { display: flex; align-items: flex-start; gap: 8px; }
.eml-head h2 { flex: 1; margin: 0; font-size: 20px; font-weight: 400; }
.eml-meta { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.eml-window .attach-block { margin-left: 0; }
.eml-body {
  font: 13px/1.45 Arial, Helvetica, sans-serif; color: #202124;
  max-height: 60vh; overflow: auto; white-space: normal;
}
.eml-body p { margin: 0 0 .2em; }
.eml-body div, .eml-body h1, .eml-body h2, .eml-body h3 { margin: 0; }
.eml-body table { border-collapse: collapse; border-spacing: 0; }
.eml-body td, .eml-body th {
  vertical-align: top; line-height: 1.35;
  padding-top: 6px !important; padding-bottom: 6px !important;
}
.eml-body td p, .eml-body td div, .eml-body th p, .eml-body th div { margin: 0 !important; line-height: 1.35; }
.eml-body img { max-width: 100%; height: auto; }
.eml-loading { color: var(--muted); }
.scrim.scrim-preview { background: rgba(32, 33, 36, 0.72); padding: 20px; }
.dialog.preview-window {
  width: calc(100vw - 48px); height: calc(100vh - 40px); max-height: none;
  padding: 12px 16px 16px; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden;
}
.preview-stage { flex: 1; min-height: 0; margin-top: 12px; background: #3c4043; border-radius: 8px; overflow: hidden; }
.preview-stage iframe, .preview-stage img { width: 100%; height: 100%; border: 0; object-fit: contain; background: #3c4043; }
.reply-actions { display: flex; gap: 8px; padding: 8px 16px 28px 68px; }
.reply-btn {
  height: 36px; border-radius: 18px; border: 1px solid #747775; background: #fff; color: #444746;
  padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
}
.reply-btn:hover { background: #f2f2f2; }

.compose {
  position: fixed; right: 72px; bottom: 0; width: 650px; height: 600px; max-height: calc(100vh - 40px);
  background: #fff; border-radius: 16px 16px 0 0; z-index: 40;
  box-shadow: 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12), 0 5px 5px -3px rgba(0,0,0,.2);
  display: flex; flex-direction: column;
}
.compose.full { left: 64px; right: 64px; top: 32px; width: auto; height: auto; border-radius: 16px; }
.compose.min { height: 48px; width: 328px; overflow: hidden; }
.compose-head {
  height: 40px; background: #f2f6fc; border-radius: 16px 16px 0 0; display: flex; align-items: center;
  justify-content: space-between; padding: 0 8px 0 16px; color: #041e49; flex: none;
}
.compose.min .compose-head { cursor: pointer; }
.compose-head-actions { display: flex; }
.compose-head .icon-btn, .compose-head button { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 50%; color: #444746; }
.compose-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.field-row { display: flex; align-items: center; min-height: 36px; border-bottom: 1px solid #f1f3f4; padding: 0 12px; gap: 8px; }
.field-label { color: var(--muted); width: 40px; flex: none; }
.field-row input[type="text"] { border: 0; outline: 0; flex: 1; height: 36px; }
.from-pick {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%;
  border: 0; background: transparent; padding: 4px 2px; margin: 0; cursor: default;
  color: #202124; font: inherit; text-align: left;
}
.from-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.from-text .from-addr { color: var(--muted); }
.from-caret { font-size: 20px; color: #5f6368; flex: none; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; flex: 1; min-width: 0; padding: 4px 0; }
.chips input { border: 0; outline: 0; min-width: 80px; flex: 1; height: 28px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #e8eaed; border-radius: 16px; padding: 2px 4px 2px 2px; font-size: 13px; max-width: 100%; }
.chip-face { width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; flex: none; object-fit: cover; }
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.chip button { border: 0; background: transparent; cursor: pointer; color: #444746; width: 18px; height: 18px; border-radius: 50%; padding: 0; line-height: 1; }
.chip button:hover { background: rgba(32, 33, 36, .12); }
.suggest button { display: flex; align-items: center; gap: 8px; }
.copy-toggles { display: flex; gap: 2px; flex: none; }
.field-row .text-btn { margin: 0; padding: 0 6px; color: var(--blue); font-weight: 500; white-space: nowrap; }
.text-btn { border: 0; background: transparent; color: var(--muted); }
.editor { flex: 1; min-height: 160px; overflow: auto; padding: 12px 16px; outline: none; }
/* What you write stays in Arial, as in Gmail and as the letter is shown in the reader. */
.editor, .sig-box { font-family: Arial, Helvetica, sans-serif; }
.editor img { max-width: 100%; }
.suggest {
  position: absolute; left: 48px; right: 16px; background: #fff; z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,.24); border-radius: 4px; overflow: hidden;
}
.suggest button { width: 100%; text-align: left; border: 0; background: #fff; padding: 8px 12px; }
.suggest button:hover, .suggest button.active { background: #e8f0fe; }
.suggest .directory-tag { color: var(--muted); font-size: 12px; margin-left: 6px; }
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 10px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; border: 1px solid #dadce0; border-radius: 8px; padding: 7px 6px 7px 12px; font-size: 13px; line-height: 18px; color: #202124; background: #fff; }
.file-chip .material-symbols-outlined { font-size: 18px; color: #5f6368; flex: none; }
.file-chip-name { min-width: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-chip-size { flex: none; color: #5f6368; }
.file-chip-bar { flex: none; width: 96px; height: 8px; border: 1px solid #a8c7fa; border-radius: 2px; background: #fff; overflow: hidden; }
.file-chip-bar span { display: block; height: 100%; width: 0; background: #0b57d0; transition: width .15s linear; }
.file-chip.uploading .file-chip-name { color: #5f6368; }
.file-chip button { flex: none; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: #5f6368; font-size: 16px; line-height: 24px; cursor: pointer; }
.file-chip button:hover { background: #f1f3f4; color: #202124; }
.compose-foot { display: flex; align-items: center; gap: 2px; padding: 8px 8px 12px 12px; flex: none; z-index: 99; background-color: #fff;}
.send-btn { background: var(--blue); color: #fff; border: 0; border-radius: 18px; height: 36px; padding: 0 24px; font-weight: 500; margin-right: 6px; }
.send-btn:hover { background: var(--blue-deep); }
.send-btn:disabled { opacity: .7; }
.draft-status { margin-left: auto; color: var(--muted); font-size: 12px; padding-right: 8px; }
.discard { margin-left: 0; }

.toast {
  position: fixed; left: 24px; bottom: 24px; z-index: 70; background: #323232; color: #fff;
  border-radius: 4px; min-width: 280px; max-width: 480px; padding: 14px 16px 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  box-shadow: 0 3px 5px rgba(0,0,0,.2);
}
.toast button { border: 0; background: transparent; color: #a8c7fa; font-weight: 500; }
.mail-notice {
  position: fixed; top: 72px; right: 16px; z-index: 70; width: min(340px, calc(100vw - 32px));
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px 14px 16px;
  background: #fff; color: var(--text); border-radius: 16px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(60,64,67,.28), 0 1px 3px rgba(60,64,67,.2);
}
.mail-notice .material-symbols-outlined { color: var(--blue); margin-top: 2px; }
.mail-notice strong, .mail-notice span { display: block; }
.mail-notice strong { font-size: 14px; font-weight: 500; line-height: 20px; }
.mail-notice span { margin-top: 2px; color: #444746; font-size: 13px; line-height: 18px; }
.mail-notice .icon-btn { width: 32px; height: 32px; margin-left: auto; flex: none; }
.cal-alarm-stack {
  position: fixed; right: 16px; bottom: 16px; z-index: 75;
  display: flex; flex-direction: column-reverse; gap: 10px;
  width: min(280px, calc(100vw - 32px)); pointer-events: none;
}
.cal-alarm {
  pointer-events: auto; background: #3c4043; color: #fff; border-radius: 4px;
  padding: 14px 14px 12px; box-shadow: 0 6px 18px rgba(0,0,0,.28);
  font-size: 13px; line-height: 1.35;
}
.cal-alarm-title {
  font-size: 15px; font-weight: 600; margin: 0 0 10px; word-break: break-word;
  cursor: pointer;
}
.cal-alarm-title:hover { text-decoration: underline; }
.cal-alarm-meta { color: #dadce0; margin: 0 0 10px; font-size: 12px; }
.cal-alarm-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px;
}
.cal-alarm-row label { color: #e8eaed; white-space: nowrap; }
.cal-alarm-row select {
  flex: 1; min-width: 120px; height: 30px; border: 1px solid #5f6368; border-radius: 4px;
  background: #202124; color: #fff; padding: 0 8px; font: inherit;
}
.cal-alarm-actions { display: flex; justify-content: flex-end; gap: 4px; }
.cal-alarm-actions button {
  border: 0; background: transparent; color: #a8c7fa; font: inherit; font-weight: 600;
  letter-spacing: .02em; text-transform: uppercase; padding: 8px 10px; cursor: pointer;
  border-radius: 4px;
}
.cal-alarm-actions button:hover { background: rgba(255,255,255,.08); }
.sieve-list { width: min(640px, 100%); }
.sieve-row { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); }
.sieve-row .name { flex: 1; min-width: 0; font-size: 14px; }
.settings .sieve-row input, .settings-panel .check-row input {
  width: 18px; height: 18px; margin: 0; padding: 0; border: 0; accent-color: var(--blue); flex: none;
}
.settings-panel .check-row { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; font-size: 14px; color: var(--text); cursor: pointer; }
.dialog .sieve-cond select, .dialog .sieve-cond input { width: auto; min-width: 0; }
.sieve-cond { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.sieve-cond select, .sieve-cond input { flex: 1; min-width: 0; }
#panel-vacation textarea, #panel-forward textarea { min-height: 120px; }

.scrim { position: fixed; inset: 0; background: rgba(32,33,36,.45); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog {
  background: #fff; border-radius: 16px; width: min(560px, 100%);
  padding: 24px 28px 0; box-shadow: 0 8px 28px rgba(60,64,67,.28);
  box-sizing: border-box; max-height: min(94vh, 900px); overflow: auto;
  display: flex; flex-direction: column;
}
.dialog.confirm { width: min(400px, 100%); padding: 28px 28px 0; }
.dialog.confirm h2 { margin-bottom: 12px; }
.dialog.confirm p { margin: 0; font-size: 14px; line-height: 20px; color: #202124; }
/* Gmail-style confirm and progress dialogs (askConfirm, emptyFolderFlow). */
.dialog.ask { width: min(560px, 100%); padding: 28px 28px 0; border-radius: 24px; }
.dialog.ask h2 { font-size: 24px; line-height: 32px; margin-bottom: 16px; }
.dialog.ask p { font-size: 14px; line-height: 22px; color: #3c4043; }
.dialog.ask .dialog-actions { border-top: 0; box-shadow: none; margin-top: 12px; padding-top: 12px; padding-bottom: 24px; }
.dialog.ask .btn.primary { min-width: 72px; }
.dialog.ask .btn:disabled { opacity: .6; cursor: default; }
.dialog.ask .btn:focus { outline: none; }
.dialog.ask .btn:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #a8c7fa; }
.dialog h2 { margin: 0 0 16px; font-size: 22px; font-weight: 400; line-height: 28px; color: #1f1f1f; flex: none; }
.dialog > label:not(.check-row):not(.check-line) {
  display: block; margin: 12px 0 6px; font-size: 12px; line-height: 16px; color: #444746;
}
.dialog > label:not(.check-row):not(.check-line):first-of-type { margin-top: 0; }
.dialog input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.dialog textarea,
.dialog select {
  display: block; width: 100%; box-sizing: border-box;
  border: 1px solid #747775; border-radius: 10px; padding: 0 16px;
  background-color: #fff; font: inherit; color: inherit; flex: none;
}
.dialog input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) { height: 44px; }
.dialog select { height: 44px; padding-right: 40px; }
.dialog input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):focus,
.dialog textarea:focus,
.dialog select:focus { outline: 2px solid var(--blue); border-color: transparent; }
.dialog textarea { min-height: 72px; max-height: 140px; padding: 12px 16px; resize: vertical; line-height: 20px; }
.dialog .check-row,
.dialog .check-line {
  display: flex; align-items: center; gap: 12px; margin: 0;
  min-height: 40px; padding: 4px 0; font-size: 14px; line-height: 20px;
  color: #1f1f1f; cursor: pointer;
}
.dialog .check-row input,
.dialog .check-line input,
.dialog input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0; padding: 0; border: 0;
  flex: none; accent-color: var(--blue); cursor: pointer;
}
.dialog .form-stack { display: flex; flex-direction: column; gap: 4px; }
.dialog .form-stack + .form-stack { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e0e0e0; }
.dialog .form-indent { margin: 4px 0 0 30px; }
.dialog .form-indent input { margin: 0; }
.dialog hr { border: 0; border-top: 1px solid #e0e0e0; margin: 16px 0; }
.dialog .colors { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; }
.dialog .colors button {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer;
}
.dialog .colors button.on { box-shadow: inset 0 0 0 2px #fff; border-color: #1f1f1f; }
.popover.search-panel {
  min-width: 0; max-width: none; max-height: min(78vh, 560px); overflow: auto;
  padding: 4px 16px 12px; border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 10px rgba(60,64,67,.28); z-index: 60;
}
.adv-row { display: grid; grid-template-columns: 148px 1fr; align-items: center; min-height: 44px; gap: 12px; }
.adv-row > span { color: #444746; font-size: 14px; }
.adv-row input, .adv-row select {
  width: 100%; height: 36px; border: 0; border-bottom: 1px solid #c4c7c5; border-radius: 0;
  background-color: transparent; padding: 0 2px; font: inherit; color: inherit;
}
.adv-row select { padding-right: 28px; background-position: right 2px center; }
.adv-row input:focus, .adv-row select:focus { outline: none; border-bottom: 2px solid var(--blue); }
.search-line { display: flex; align-items: center; gap: 16px; }
.search-line > * { flex: 1; min-width: 0; }
.adv-checks { display: flex; align-items: center; gap: 20px; min-height: 36px; }
.adv-checks label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #202124; }
.adv-checks input { width: 18px; height: 18px; margin: 0; padding: 0; border: 0; flex: none; accent-color: var(--blue); }
.adv-actions { display: flex; justify-content: flex-end; padding-top: 10px; }
.popover.search-panel .btn.primary {
  display: inline-flex; width: auto; min-height: 36px; padding: 0 24px;
  background: var(--blue); color: #fff;
}
.popover.search-panel .btn.primary:hover { background: var(--blue-deep); }
.dialog.snooze-picker { width: min(560px, 94vw); }
.picker-body { display: flex; gap: 28px; align-items: flex-start; margin-top: 8px; }
.picker-cal { width: 288px; flex: none; border: 1px solid var(--blue); border-radius: 8px; padding: 4px 8px 10px; }
.picker-head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 8px; font-size: 16px; }
.picker-head span { display: flex; }
.picker-head button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #444746; display: inline-flex; align-items: center; justify-content: center; }
.picker-head button:hover { background: #f1f3f4; }
.picker-week, .picker-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.picker-week span { text-align: center; color: #444746; font-size: 12px; line-height: 32px; }
.picker-days button {
  width: 36px; height: 36px; margin: 1px auto; border: 0; border-radius: 50%; background: transparent; color: inherit; padding: 0;
}
.picker-days button:hover:not(:disabled) { background: #f1f3f4; }
.picker-days button.out { color: #9aa0a6; }
.picker-days button.today { box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }
.picker-days button.on, .picker-days button.on.today { background: var(--blue); color: #fff; box-shadow: none; }
.picker-days button:disabled { color: #c4c7c5; cursor: default; }
.picker-fields { flex: 1; display: flex; flex-direction: column; gap: 18px; min-width: 0; padding-top: 48px; }
.dialog.snooze-picker .picker-fields input { height: 56px; border-radius: 8px; font-size: 16px; }
.dialog-actions {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  position: sticky; bottom: 0; z-index: 3; flex: none;
  margin: 20px -28px 0; padding: 14px 28px 18px;
  background: #fff; border-top: 1px solid #e8eaed;
  box-shadow: 0 -6px 12px rgba(255,255,255,.9);
}
.dialog-actions .btn.danger { margin-right: auto; }
.btn { border: 0; background: transparent; color: var(--blue); font-weight: 500; height: 40px; padding: 0 20px; border-radius: 20px; font: inherit; cursor: pointer; }
.btn:hover { background: #e8f0fe; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.busy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.busy::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.btn.primary:hover { background: var(--blue-deep); }
.btn.danger { color: var(--danger); }
.colors { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.colors button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #dadce0; }
.colors button.on { box-shadow: 0 0 0 2px var(--blue); }

.popover {
  position: fixed; z-index: 60; background: #fff; min-width: 220px; max-width: 320px;
  border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.24); padding: 8px 0; max-height: calc(100vh - 16px); overflow: auto;
}
.popover button, .menu-row {
  display: flex; width: 100%; align-items: center; gap: 12px; text-align: left;
  border: 0; background: #fff; padding: 8px 16px; cursor: pointer; min-height: 36px;
}
.popover button:hover, .menu-row:hover { background: #f1f3f4; }
.popover.snooze-menu { min-width: 288px; padding: 6px 0 8px; }
.snooze-title { padding: 10px 24px 8px; color: #444746; font-size: 14px; }
.popover.snooze-menu .snooze-choice { justify-content: space-between; min-height: 34px; padding: 0 24px; gap: 32px; }
.snooze-when { color: #5f6368; font-size: 14px; margin-left: auto; white-space: nowrap; }
.popover.snooze-menu #pick-snooze { min-height: 44px; padding: 0 24px; }
.popover .material-symbols-outlined { font-size: 20px; color: #444746; width: 20px; }
.menu-sep { height: 1px; background: #e8eaed; margin: 6px 0; }
.source-dialog { width: min(860px, 94vw); }
.source-view {
  max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #f6f8fc; padding: 12px; border-radius: 8px; margin: 0;
}
.account-card { padding: 12px 16px 8px; border-bottom: 1px solid #eee; }
.account-card strong, .account-card span { display: block; }
.account-card span { color: var(--muted); font-size: 13px; }
.popover.account-menu {
  width: 360px; min-width: 0; max-width: calc(100vw - 16px); max-height: none;
  border-radius: 28px; padding: 12px 0 16px;
  box-shadow: 0 4px 8px 3px rgba(60,64,67,.15), 0 1px 3px rgba(60,64,67,.3);
}
.popover.account-menu .account-card {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px 16px; border-bottom: 0;
}
.popover.account-menu .account-avatar {
  width: 56px; height: 56px; border-radius: 50%; color: #fff; font-size: 22px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
}
.avatar-btn .letter { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.popover.account-menu .account-avatar .letter { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.popover.account-menu .account-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.popover.account-menu .account-id { min-width: 0; }
.popover.account-menu .account-id strong { font-size: 16px; font-weight: 500; line-height: 24px; }
.popover.account-menu .account-id span {
  font-size: 14px; line-height: 20px; color: #444746;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.popover.account-menu .menu-sep { margin: 8px 0; }
.popover button.busy { pointer-events: none; color: #444746; }
.popover button.busy .material-symbols-outlined { visibility: hidden; width: 0; }
.popover button.busy::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid #dadce0; border-top-color: var(--blue);
  animation: btn-spin .7s linear infinite;
}
.popover.account-menu button { min-height: 48px; padding: 0 24px; gap: 16px; font-size: 14px; }
.popover.account-menu .material-symbols-outlined { font-size: 22px; width: 22px; }

.settings { flex: 1; min-height: 0; overflow: auto; background: #fff; }
.settings-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px;
  height: 64px; padding: 0 12px; background: #fff;
}
.settings-bar h1 { margin: 0; font-size: 22px; font-weight: 400; }
.settings-tabs {
  position: sticky; top: 64px; z-index: 2; display: flex; gap: 4px;
  max-width: 820px; margin: 0 auto; width: 100%; padding: 0 32px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.settings-tab {
  border: 0; background: transparent; height: 48px; padding: 0 16px; margin-bottom: -1px;
  font: inherit; font-size: 14px; font-weight: 500; color: #444746; cursor: pointer;
  border-bottom: 3px solid transparent;
}
.settings-tab:hover { background: rgba(11, 87, 208, .06); }
.settings-tab.on { color: var(--blue); border-bottom-color: var(--blue); }
.settings-body { max-width: 820px; margin: 0 auto; padding: 8px 32px 48px; }
.settings-panel section:first-child { border-top: 0; padding-top: 12px; }
.settings-hero { display: flex; align-items: center; gap: 20px; padding: 8px 0 28px; }
.settings-photo { position: relative; width: 96px; height: 96px; flex: none; }
.settings-face, .settings-photo img.settings-face {
  width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 36px; font-weight: 500; object-fit: cover;
}
.settings-photo .photo-btn {
  position: absolute; right: -2px; bottom: -2px; width: 36px; height: 36px; border: 2px solid #fff;
  border-radius: 50%; background: #e8f0fe; color: #0b57d0; display: flex; align-items: center; justify-content: center; padding: 0;
}
.settings-photo .photo-btn:hover { background: #d3e3fd; }
.settings-who { min-width: 0; }
.settings-who strong, .settings-who span { display: block; }
.settings-who strong { font-size: 22px; font-weight: 400; line-height: 28px; }
.settings-who span { color: #444746; font-size: 14px; line-height: 20px; margin-top: 2px; }
.text-btn { border: 0; background: transparent; color: var(--blue); font-weight: 500; padding: 8px 0 0; margin-top: 10px;}
.text-btn:hover { text-decoration: underline; }
.settings section { border-top: 1px solid var(--line); padding: 28px 0 8px; }
.settings h2 { margin: 0 0 18px; font-size: 16px; font-weight: 500; }
.settings label { display: block; margin: 16px 0 6px; font-size: 12px; color: #444746; }
.settings input, .settings select, .settings textarea {
  width: min(480px, 100%); border: 1px solid #747775; border-radius: 4px; background-color: #fff;
  font: inherit; color: inherit;
}
.settings input, .settings select { height: 44px; padding: 0 14px; }
.settings select { padding-right: 40px; }
.settings textarea { min-height: 140px; padding: 12px; resize: vertical; }
.settings input:focus, .settings select:focus, .settings textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.settings label.check-row { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; font-size: 14px; color: var(--text); cursor: pointer; }
.settings label.check-row input { width: 16px; height: 16px; margin: 0; padding: 0; border: 0; accent-color: var(--blue); flex: none; }
.sig-editor { width: min(480px, 100%); border: 1px solid #747775; border-radius: 4px; background: #fff; overflow: hidden; }
.sig-editor:focus-within { outline: 2px solid var(--blue); border-color: transparent; }
.sig-tools { display: flex; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--line); background: #f8fafd; }
.sig-tools .icon-btn { width: 32px; height: 32px; border-radius: 16px; }
.sig-tools .icon-btn.on { background: #d3e3fd; color: #041e49; }
.sig-box { min-height: 140px; max-height: 280px; overflow: auto; padding: 12px; outline: none; line-height: 20px; }
.sig-box a { color: var(--blue); }
.settings .hint { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 16px; }
.settings-actions { display: flex; justify-content: flex-end; padding-top: 28px; }
.settings-actions .btn.primary { min-width: 132px; }

.empty { margin: auto; text-align: center; color: var(--muted); padding: 48px 16px; }
.empty h2 { font-weight: 400; color: var(--text); }
.check-line { display: flex; align-items: center; }

.contacts { display: grid; grid-template-columns: 280px 320px minmax(0, 1fr); min-height: 0; flex: 1; }
.directory-list, .contact-list { border-right: 1px solid var(--line); overflow: auto; min-height: 0; }
.contact-column-title { margin: 0; padding: 16px 16px 0; font-size: 14px; font-weight: 500; }
.directory-empty { margin: 0; padding: 8px 16px 16px; color: var(--muted); font-size: 13px; }
.contact-tools { display: flex; gap: 8px; padding: 12px 16px 16px; align-items: center; position: sticky; top: 0; background: #fff; z-index: 1; }
.contact-tools input { flex: 1; border: 0; background: #f1f3f4; border-radius: 8px; height: 40px; padding: 0 12px; }
.contact-item { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; background: #fff; text-align: left; padding: 10px 16px; }
.contact-item > span:last-child { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.contact-item br { display: none; }
.contact-item strong, .contact-item .snippet { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-item strong { font-size: 14px; line-height: 20px; }
.contact-item .snippet { font-size: 13px; line-height: 18px; }
.contact-item.active, .contact-item:hover { background: #e8f0fe; }
.contact-detail { padding: 28px 32px 48px; overflow: auto; min-width: 0; }
.contact-detail h2 { font-size: 28px; font-weight: 400; margin: 0; }
.contact-head { display: flex; align-items: center; gap: 16px; margin: 18px 0 12px; }
.contact-form { display: flex; flex-direction: column; align-items: stretch; gap: 22px; width: min(560px, 100%); margin-top: 30px; }
.contact-field { display: flex; flex-direction: column; align-items: stretch; width: 100%; gap: 6px; }
.contact-form label { display: block; margin: 0; font-size: 12px; line-height: 16px; color: #444746; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; box-sizing: border-box; margin: 0;
  border: 1px solid #747775; border-radius: 10px; background: #fff; font: inherit; color: inherit;
}
.contact-form input { height: 48px; padding: 0 18px; }
.contact-form textarea { min-height: 140px; padding: 14px 18px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.contact-actions { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.contact-actions .btn.primary { margin-left: auto; min-width: 132px; }
.meta-row { display: flex; gap: 12px; align-items: center; margin: 10px 0; color: #3c4043; }

.cal-page { display: grid; grid-template-columns: 240px 280px minmax(0, 1fr); min-height: 0; flex: 1; height: 100%; }
.cal-side {
  border-right: 1px solid var(--line); overflow: auto; min-height: 0;
  background: #fff; display: flex; flex-direction: column; gap: 4px; padding-bottom: 16px;
}
.cal-agenda {
  border-right: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column;
  background: #fff; position: relative;
}
.cal-agenda-tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; }
.cal-agenda-tabs button {
  flex: 1; border: 0; background: transparent; height: 44px; font: inherit; font-size: 12px;
  font-weight: 500; letter-spacing: .04em; color: #5f6368; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.cal-agenda-tabs button.on { color: var(--blue); border-bottom-color: var(--blue); }
.cal-agenda-tools { display: flex; gap: 8px; padding: 10px 12px; align-items: center; flex: none; }
.cal-agenda-tools input {
  flex: 1; border: 0; background: #f1f3f4; border-radius: 8px; height: 36px; padding: 0 12px; font: inherit;
}
.cal-agenda-list { flex: 1; min-height: 0; overflow: auto; padding: 0 0 64px; }
.cal-agenda-day { padding: 12px 12px 4px; font-size: 12px; font-weight: 500; color: #5f6368; }
.cal-agenda-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: calc(100% - 24px);
  margin: 0 12px 8px; border: 0; border-radius: 8px; padding: 10px 12px; text-align: left;
  font: inherit; color: #fff; cursor: pointer;
}
.cal-agenda-item strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cal-agenda-item span { font-size: 12px; opacity: .9; }
.cal-agenda-empty { margin: 24px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.cal-fab-wrap {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.cal-fab-menu {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.cal-fab-menu[hidden] { display: none; }
.cal-fab-mini {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #3c4043;
  box-shadow: 0 2px 6px rgba(0,0,0,.22); display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.cal-fab-mini.dark { background: #5f6368; color: #fff; }
.cal-fab-mini .material-symbols-outlined { font-size: 20px; }
.cal-fab {
  width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--blue); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cal-fab .material-symbols-outlined { font-size: 24px; color: #fff; }
.cal-agenda-item.done { opacity: .65; text-decoration: line-through; }
.cal-done-toggle {
  display: flex; align-items: center; gap: 6px; width: calc(100% - 24px); margin: 12px 12px 4px; padding: 6px 4px;
  border: 0; background: transparent; color: #5f6368; font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; border-radius: 6px; text-align: left;
}
.cal-done-toggle:hover { background: #f1f3f4; }
.cal-done-toggle .material-symbols-outlined, .cal-done-toggle .icon { transition: transform .15s; transform: rotate(-90deg); }
.cal-done-toggle.open .material-symbols-outlined, .cal-done-toggle.open .icon { transform: rotate(0deg); }
.task-overdue {
  display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px;
  background: #fff; color: #d93025; font-style: normal; font-weight: 500; font-size: 11px; line-height: 16px;
}
.dialog.cal-compose { width: min(640px, 94vw); }
.cal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.cal-form-grid > div > label { display: block; margin: 0 0 6px; font-size: 12px; color: #444746; }
.cal-form-grid input, .cal-form-grid select { width: 100%; box-sizing: border-box; }
.cal-privacy { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 8px; }
.cal-check-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 4px; }
.cal-priority { width: 100%; margin: 4px 0 0; accent-color: var(--blue); }
/* A slider is not a text box: no border, box height or focus frame around it. */
.dialog input.cal-priority[type="range"] {
  height: 20px; padding: 0; border: 0; border-radius: 0; background: transparent; outline: none;
}
.dialog input.cal-priority[type="range"]:focus,
.dialog input.cal-priority[type="range"]:focus-visible { outline: none; border: 0; }
.dialog input.cal-priority[type="range"]:disabled { opacity: .6; cursor: default; }
.dialog .cal-url-row.locked { grid-template-columns: minmax(0, 1fr); }
.dialog .cal-url-row.locked a { color: var(--blue); overflow-wrap: anywhere; font-size: 14px; }
.cal-priority-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #5f6368; margin: 2px 0 8px;
}
.cal-percent {
  margin: 8px 0 12px; padding: 10px 12px; border: 1px solid #e8eaed; border-radius: 10px;
  background: #fafafa;
}
.cal-percent.hidden { display: none; }
.cal-percent-range { width: 100%; margin: 0; accent-color: #0b8043; }
.cal-percent-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: #3c4043; margin-top: 6px;
}
.cal-percent-meta #t-percent-val { font-weight: 600; min-width: 1.5em; }
.cal-cat-picker { position: relative; margin: 0 0 4px; }
.cal-cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.cal-cat-chip {
  display: inline-flex; align-items: center; gap: 6px; background: #f1f3f4; color: #3c4043;
  border-radius: 16px; padding: 4px 8px 4px 8px; font-size: 13px;
}
.cal-cat-chip strong { font-weight: 500; }
.cal-cat-chip button {
  border: 0; background: transparent; width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: #5f6368;
}
.cal-cat-chip button .material-symbols-outlined { font-size: 14px; }
.cal-cat-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.cal-cat-add {
  border: 0; background: transparent; color: #5f6368; font: inherit; font-size: 14px;
  padding: 6px 0; cursor: pointer; text-align: left;
}
.cal-cat-add:hover { color: var(--blue); }
.cal-cat-menu {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  background: #fff; border: 1px solid #dadce0; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(60,64,67,.2); max-height: 220px; overflow: auto; padding: 4px 0;
}
.cal-cat-option {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: #fff;
  text-align: left; padding: 8px 14px; font: inherit; cursor: pointer; color: #202124;
}
.cal-cat-option:hover, .cal-cat-option.on { background: #e8f0fe; }
.dialog .cal-url-list {
  display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px;
  width: 100%; box-sizing: border-box;
}
.dialog .cal-url-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.dialog .cal-url-row input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  display: block;
  box-sizing: border-box;
}
.dialog .cal-url-remove {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid #dadce0; background: #fff;
  color: #5f6368; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.cal-url-remove .material-symbols-outlined { font-size: 18px; }
.cal-url-add {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent;
  color: var(--blue); font: inherit; font-weight: 500; cursor: pointer; padding: 4px 0 8px; margin: 0;
}
.cal-url-add .material-symbols-outlined { font-size: 20px; }
.cal-invite {
  border: 1px solid #747775; border-radius: 10px; padding: 8px 10px; background: #fff;
  margin: 0 0 8px;
}
.cal-invite.readonly { background: #f8f9fa; }
.cal-invite input {
  width: 100%; border: 0 !important; height: 36px !important; padding: 0 4px !important;
  outline: none !important; box-shadow: none !important; background: transparent;
}
.cal-attendee-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-attendee-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  background: #f1f3f4; color: #3c4043; border-radius: 16px; padding: 3px 6px 3px 3px;
  font-size: 12px;
}
.cal-attendee-face {
  width: 22px; height: 22px; border-radius: 50%; color: #fff; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500;
}
.cal-attendee-chip strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-attendee-status {
  width: 16px; height: 16px; border-radius: 50%; background: #9aa0a6; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.cal-attendee-status .material-symbols-outlined { font-size: 12px; color: #fff; }
.cal-attendee-chip button {
  border: 0; background: transparent; width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: #5f6368;
}
.cal-attendee-chip button .material-symbols-outlined { font-size: 16px; }
.invite-card {
  margin: 8px 16px 16px; padding: 16px 18px; border: 1px solid #e0e0e0; border-radius: 12px;
  background: #fff; max-width: 720px;
}
.invite-lead { margin: 0 0 12px; color: #3c4043; }
.invite-summary {
  background: #f1f3f4; border-radius: 8px; padding: 12px 14px; display: grid; gap: 8px; margin: 0 0 14px;
}
.invite-summary div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; align-items: start; }
.invite-summary span { color: #5f6368; font-size: 13px; }
.invite-summary strong { font-weight: 500; color: #202124; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.invite-btn {
  border: 1px solid #dadce0; background: #fff; color: #202124; border-radius: 4px;
  height: 36px; padding: 0 16px; font: inherit; font-weight: 500; cursor: pointer;
}
.invite-btn.accept { background: #0b8043; border-color: #0b8043; color: #fff; }
.invite-btn.decline { background: #d93025; border-color: #d93025; color: #fff; }
.invite-btn:disabled { opacity: .55; cursor: default; }
.invite-reply-badge {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 16px;
  font-size: 13px; font-weight: 500; margin: 0 0 14px; background: #e8f0fe; color: #174ea6;
}
.invite-reply-badge.accepted { background: #e6f4ea; color: #137333; }
.invite-reply-badge.declined { background: #fce8e6; color: #c5221f; }
.invite-reply-badge.tentative { background: #fef7e0; color: #b06000; }
.invite-organizer { margin: 0 0 12px; color: #3c4043; font-size: 13px; }
.invite-organizer a { color: #0b57d0; text-decoration: none; }
.invite-label { margin: 14px 0 6px; color: #5f6368; font-size: 12px; }
.invite-label:first-of-type { margin-top: 0; }
.invite-people { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.invite-person {
  display: inline-flex; align-items: center; gap: 6px; background: #f1f3f4; border-radius: 16px;
  padding: 3px 8px 3px 3px; font-size: 13px; color: #3c4043;
}
.invite-face {
  width: 22px; height: 22px; border-radius: 50%; color: #fff; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500;
}
.invite-status {
  width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; flex: none; background: #9aa0a6; color: #fff;
}
.invite-status.ok { background: #0b8043; }
.invite-status.no { background: #d93025; }
.invite-status.maybe { background: #f9ab00; }
.invite-status .material-symbols-outlined { font-size: 12px; color: #fff; }
.invite-desc { color: #202124; white-space: pre-wrap; margin: 0 0 16px; }
.invite-links-label { margin-top: 4px; }
.invite-links { display: flex; flex-direction: column; gap: 4px; margin: 0 0 8px; }
.invite-links a { color: #0b57d0; text-decoration: none; word-break: break-all; font-size: 13px; }
.invite-links a:hover { text-decoration: underline; }
.invite-card.cancelled { border-color: #f5c2c0; }
.invite-lead.invite-cancelled { color: #c5221f; font-weight: 500; }
.cal-check-row select { width: auto; min-width: 160px; height: 36px; margin: 0; }
@media (max-width: 640px) {
  .cal-form-grid { grid-template-columns: 1fr; }
}
.cal-side-head { padding: 16px 16px 8px; }
.cal-side-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.cal-group { padding: 4px 0 8px; }
.cal-group h3 {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0; padding: 8px 8px 4px 16px; font-size: 12px; font-weight: 500;
  color: #5f6368; text-transform: uppercase; letter-spacing: .02em;
}
.cal-group h3 .icon-btn { width: 28px; height: 28px; }
.cal-line { display: flex; align-items: center; gap: 2px; padding: 0 4px 0 8px; min-height: 36px; }
.cal-pick {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  border: 0; background: transparent; text-align: left; padding: 6px 8px; border-radius: 16px;
  font: inherit; color: inherit; cursor: pointer;
}
.cal-pick:hover { background: #e8eaed; }
.cal-pick > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-check {
  width: 16px; height: 16px; border-radius: 3px; border: 2px solid currentColor;
  flex: none; box-sizing: border-box; background: transparent;
}
.cal-check.on { background: currentColor; box-shadow: inset 0 0 0 2px #fff; }
.cal-empty { margin: 0; padding: 4px 16px 8px; color: var(--muted); font-size: 13px; }
.people-list { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow: auto; margin-top: 8px; }
.people-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  border: 0; background: #fff; text-align: left; padding: 10px 12px; border-radius: 8px; font: inherit; cursor: pointer;
}
.people-row:hover { background: #e8f0fe; }
.people-row strong { font-weight: 500; }
.people-row span { color: var(--muted); font-size: 12px; }
.popover hr { border: 0; border-top: 1px solid #e0e0e0; margin: 4px 0; }
.dialog .hint { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 16px; }
.link-row { display: flex; gap: 8px; align-items: center; margin: 0 0 4px; }
.link-row input { flex: 1; min-width: 0; }
.cal { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cal-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; flex-wrap: wrap; }
.cal-head .spacer { flex: 1; min-width: 8px; }
.cal-head h2 { font-size: 22px; font-weight: 400; margin: 0 8px; }
.today-btn { border: 1px solid #dadce0; background: #fff; border-radius: 4px; height: 36px; padding: 0 16px; }
/* minmax(0, 1fr): a long event title is cut with "…", it never widens its day. */
.dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dow { color: var(--muted); font-size: 11px; text-transform: uppercase; padding: 0 0 8px; }
.dow span, .cal-cell { padding: 4px; }
.cal-grid { flex: 1; border-top: 1px solid #e0e0e0; overflow: auto; }
.cal-cell { min-height: 108px; min-width: 0; overflow: hidden; border-right: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; }
.cal-cell.out { background: #fafafa; color: #9aa0a6; }
.num { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 12px; }
.cal-cell.today .num { background: var(--blue); color: #fff; }
.event-chip {
  display: block; width: 100%; text-align: left; border: 0; color: #fff; border-radius: 4px;
  font-size: 12px; padding: 1px 6px; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cal-views { display: flex; border: 1px solid #dadce0; border-radius: 4px; overflow: hidden; }
.cal-views button { border: 0; background: #fff; height: 36px; padding: 0 14px; }
.cal-views button.on { background: #e8f0fe; color: var(--blue); font-weight: 500; }
.cal-views button + button { border-left: 1px solid #dadce0; }
.cal-time { min-height: 0; }
.week-head, .allday-row { display: grid; flex: none; }
.week-head { border-bottom: 1px solid #e0e0e0; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.week-day strong { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 400; color: var(--text); text-transform: none; }
.week-day.today strong { background: var(--blue); color: #fff; }
.allday-row { border-bottom: 1px solid #e0e0e0; min-height: 28px; }
.allday-label { color: var(--muted); font-size: 11px; padding: 6px 8px 0 0; text-align: right; }
.allday-col { position: relative; min-height: 28px; padding: 4px; border-left: 1px solid #f1f3f4; }
.allday-hit { position: absolute; inset: 0; border: 0; background: transparent; }
.allday-col .event-chip { position: relative; z-index: 1; }
.week-scroll { flex: 1; min-height: 0; overflow: auto; }
.week-body { display: grid; grid-template-columns: 64px minmax(0, 1fr); position: relative; }
.week-times { position: relative; }
.week-times span { position: absolute; right: 8px; transform: translateY(-50%); color: var(--muted); font-size: 11px; }
.week-cols { display: grid; position: relative; }
.day-col { position: relative; height: 1152px; border-left: 1px solid #e0e0e0; }
.hour-slot { position: absolute; left: 0; right: 0; height: 48px; border: 0; border-top: 1px solid #e8eaed; background: transparent; padding: 0; }
.hour-slot:hover { background: rgba(11, 87, 208, .04); }
.block-event {
  position: absolute; z-index: 2; border: 0; border-radius: 4px; color: #fff; text-align: left;
  padding: 2px 6px; overflow: hidden; font-size: 12px; line-height: 16px;
}
.block-event strong, .block-event span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.block-event span { font-weight: 400; opacity: .9; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #d93025; z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #d93025; }

.login-body { min-height: 100%; display: flex; align-items: center; justify-content: center; background: #f6f8fc; padding: 24px; }
.login-card { width: min(440px, 100%); background: #fff; border: 1px solid #e0e3e7; border-radius: 16px; padding: 40px 36px 32px; box-shadow: 0 1px 2px rgba(60,64,67,.08), 0 12px 32px rgba(60,64,67,.1); }
.login-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.login-card h1 { font-size: 24px; font-weight: 500; margin: 0 0 8px; text-align: center; }
.logo img { height: 22px; object-fit: contain; }
.login-sub { color: #444746; margin: 0 0 28px; text-align: center; font-size: 14px; line-height: 20px; }
.login-card label { display: block; font-size: 12px; color: #444746; margin: 0 0 10px; }
.login-card input { width: 100%; border: 1px solid #bfc6cf; border-radius: 10px; height: 48px; padding: 0 16px; margin: 0 0 18px; background: #fff; }
.login-card input:focus { outline: 2px solid var(--blue); border-color: transparent; }
.login-card label.login-keep { display: flex; align-items: center; gap: 10px; margin: -4px 0 6px; font-size: 14px; color: #1f1f1f; cursor: pointer; }
.login-card .login-keep input { width: 18px; height: 18px; margin: 0; padding: 0; border-radius: 4px; accent-color: var(--blue); cursor: pointer; }
.login-keep-hint { margin: 0 0 18px 28px; font-size: 12px; line-height: 1.5; color: #5f6368; }
.login-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.login-actions .btn.primary { min-width: 128px; }
.login-hint { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0 0 12px; }
.form-error { color: var(--danger); background: #fce8e6; border-radius: 8px; padding: 8px 12px; }

@media (min-width: 901px) {
  body.nav-collapsed .workspace { position: relative; }
  body.nav-collapsed .sidebar {
    position: absolute; top: 0; left: 0; bottom: 0; width: 72px; z-index: 25;
    background: var(--bg); overflow: hidden;
    transition: width .2s ease, box-shadow .2s ease;
  }
  body.nav-collapsed .stage { margin-left: 72px; }
  body.nav-collapsed .sidebar:hover,
  body.nav-collapsed .sidebar:focus-within,
  body.nav-collapsed.nav-peek .sidebar {
    width: 256px; overflow: auto;
    box-shadow: 0 8px 10px rgba(60,64,67,.15), 0 4px 16px rgba(60,64,67,.2);
  }
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .compose-btn {
    width: 56px; height: 56px; margin: 0 8px 16px; padding: 0; justify-content: center;
  }
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .compose-label,
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .nav-name,
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .more-btn,
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) #new-folder,
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .nav-manage,
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .nav-caret { display: none; }
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .nav-more {
    display: flex; flex-direction: column; align-items: center;
  }
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .nav-add { display: flex; }
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .nav-item {
    position: relative; width: 40px; height: 40px; margin: 0 auto; padding: 0; justify-content: center; border-radius: 50%;
  }
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .badge {
    position: absolute; top: 6px; right: 3px; width: 8px; height: 8px; margin: 0; padding: 0;
    border-radius: 50%; background: #d93025; font-size: 0; color: transparent; overflow: hidden;
  }
  body.nav-collapsed:not(.nav-peek) .sidebar:not(:hover):not(:focus-within) .nav-row {
    display: flex; justify-content: center;
  }
}

@media (max-width: 900px) {
  .logo span, .rail { display: none; }
  .logo { min-width: 0; }
  .sidebar { position: fixed; z-index: 30; top: 64px; bottom: 0; left: 0; background: var(--bg); transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
  .stage { margin-right: 8px; }
  .row { grid-template-columns: 24px 24px 24px 92px minmax(0,1fr) 24px auto; }
  .mail-tab { min-width: 0; gap: 6px; padding: 0 12px; font-size: 13px; }
  .compose { left: 0; right: 0; width: auto; }
  .contacts { grid-template-columns: 1fr; }
  .cal-page { grid-template-columns: 1fr; }
  .cal-side { max-height: 28vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .cal-agenda { max-height: 32vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .directory-list { max-height: 42vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .contact-detail { display: none; }
  .contacts.show-detail .directory-list,
  .contacts.show-detail .contact-list { display: none; }
  .contacts.show-detail .contact-detail { display: block; }
}

/* Reading pane: the list and the open letter side by side, or one above the other. */
.split { flex: 1; min-height: 0; display: flex; }
.split-right { flex-direction: row; }
.split-below { flex-direction: column; }
.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.pane-list { flex: 0 0 var(--pane, 45%); }
.pane-read { flex: 1 1 0; }
.pane-resize { flex: none; position: relative; z-index: 2; background: transparent; }
.split-right .pane-resize { width: 7px; margin: 0 -3px; cursor: col-resize; }
.split-below .pane-resize { height: 7px; margin: -3px 0; cursor: row-resize; }
.pane-resize::after { content: ""; position: absolute; background: #e3e3e3; }
.split-right .pane-resize::after { top: 0; bottom: 0; left: 3px; width: 1px; }
.split-below .pane-resize::after { left: 0; right: 0; top: 3px; height: 1px; }
.pane-resize:hover::after, .pane-resizing .pane-resize::after { background: var(--blue); }
.split-right .pane-resize:hover::after, .pane-resizing-right .pane-resize::after { left: 2px; width: 3px; }
.split-below .pane-resize:hover::after, .pane-resizing-below .pane-resize::after { top: 2px; height: 3px; }
body.pane-resizing { user-select: none; }
body.pane-resizing-right { cursor: col-resize; }
body.pane-resizing-below { cursor: row-resize; }
body.pane-resizing iframe { pointer-events: none; }
.pane-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 14px; }
.pane-empty .material-symbols-outlined { font-size: 56px; color: #c4c7c5; }
.pane-empty p { margin: 0; }
.row.open, .row.open.unread { background: #c2e7ff; }
.row.open.checked { background: #a8d4fb; }
.pane-read .reader-subject { padding-top: 8px; }

/* Right of inbox: two-line rows so the sender, date and subject still fit. */
.split-right .row {
  grid-template-columns: 28px 28px 28px minmax(0, 1fr) auto;
  grid-template-rows: 22px 22px; height: 56px; align-content: center;
}
.split-right .row > .check { grid-column: 1; grid-row: 1 / span 2; }
.split-right .row > .star { grid-column: 2; grid-row: 1 / span 2; }
.split-right .row > .important { grid-column: 3; grid-row: 1 / span 2; }
.split-right .row > .sender { grid-column: 4; grid-row: 1; padding-right: 8px; }
.split-right .row > .date-cell { grid-column: 5; grid-row: 1; min-width: 0; }
.split-right .row > .subject-wrap { grid-column: 4; grid-row: 2; }
.split-right .row > .clip-cell { grid-column: 5; grid-row: 2; justify-self: end; height: 22px; }
.split-right .row.snoozed .date-cell { min-width: 0; padding-left: 8px; }

/* Time zone picker: type a city or country, pick from the list. */
.zone-pick { position: relative; width: min(480px, 100%); }
.settings .zone-pick #zone-search { width: 100%; padding-right: 44px; text-overflow: ellipsis; }
.zone-caret { position: absolute; right: 12px; top: 10px; color: #444746; cursor: pointer; }
.zone-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow: auto;
  background: #fff; border-radius: 8px; box-shadow: 0 2px 6px rgba(60,64,67,.3), 0 6px 20px rgba(60,64,67,.15); padding: 6px 0;
}
.zone-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; cursor: pointer; font-size: 14px; }
.zone-option.active { background: #f1f3f4; }
.zone-option.chosen { color: var(--blue); font-weight: 500; }
.zone-option.chosen.active { background: #e8f0fe; }
.zone-hint { flex: none; color: #5f6368; font-size: 12px; font-weight: 400; }
.zone-empty { padding: 12px 16px; color: #5f6368; font-size: 14px; }

/* Counts on the Inbox tabs, like Gmail's "7 new". */
.mail-tab .tab-count {
  flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px;
  font-size: 12px; font-weight: 500; line-height: 20px; color: #fff; overflow: visible;
}
.mail-tab .tab-count.hidden { display: none; }
.tab-count-inbox { background: #0b57d0; }
.tab-count-starred { background: linear-gradient(90deg, #fbbc04, #f29900); color: #3c2a00 !important; }
.tab-count-snoozed { background: #188038; }

/* Filter chips under the search bar. */
.search-chips { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px 4px; }
.search-chip-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 14px;
  border: 1px solid #747775; border-radius: 8px; background: #fff; color: #1f1f1f; font: inherit; font-size: 14px; cursor: pointer;
}
.search-chip-btn:not(.on) { padding-right: 6px; }
.search-chip-btn:hover { background: #f1f3f4; }
.search-chip-btn.on { background: #d3e3fd; border-color: #d3e3fd; color: #041e49; }
.search-chip-btn.on:hover { background: #c2d7fb; }
.search-chip-btn .material-symbols-outlined { font-size: 20px; }
.search-chip-btn[data-action="chip-attach"] { padding-right: 14px; }
.search-chip-btn[data-action="chip-attach"].on { padding-left: 8px; }
.chip-x { display: inline-flex; border-radius: 50%; margin-left: 2px; }
.chip-x:hover { background: rgba(4,30,73,.12); }
.chip-x .material-symbols-outlined { font-size: 18px; }
.search-chip-link { border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 14px; font-weight: 500; padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.search-chip-link:hover { background: #f1f3f4; }
.popover.chip-menu { min-width: 240px; }
.popover.chip-menu button.chosen { background: #f1f3f4; }
.popover.chip-menu .menu-gap { width: 20px; flex: none; }
.popover.chip-menu .menu-line { height: 1px; background: var(--line); margin: 6px 0; }
.popover.chip-range-menu { padding: 16px; max-width: none; }
.chip-dates { display: flex; }
.chip-dates label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #444746; }
.chip-dates input { height: 40px; border: 1px solid #c4c7c5; padding: 0 10px; font: inherit; color: inherit; }
.chip-dates label:first-child input { border-radius: 6px 0 0 6px; }
.chip-dates label:last-child input { border-radius: 0 6px 6px 0; border-left: 0; }
.chip-range-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.popover.chip-menu .chip-range-actions .btn { width: auto; min-height: 36px; padding: 0 22px; justify-content: center; }
.popover.chip-to-menu { width: 360px; max-width: calc(100vw - 16px); padding: 12px 0 8px; }
.chip-to input { display: block; width: calc(100% - 32px); margin: 0 16px 8px; height: 40px; border: 0; border-bottom: 1px solid #c4c7c5; font: inherit; font-size: 15px; outline: none; }
.chip-to input:focus { border-bottom: 2px solid var(--blue); }
.popover.chip-menu .chip-person { gap: 14px; padding: 8px 16px; min-height: 56px; }
.chip-person.active { background: #f1f3f4; }
.chip-person .avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.chip-person-text { display: flex; flex-direction: column; min-width: 0; }
.chip-person-text strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-person-text span { color: #5f6368; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-empty { padding: 10px 16px; color: #5f6368; font-size: 13px; }

/* Account menu: storage use and last activity. */
/* Storage, like Gmail's account menu: a rounded strip with a cloud icon. */
.popover.account-menu .account-usage {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 16px 4px; padding: 14px 20px; border-radius: 24px; background: #f0f4f9;
}
.popover.account-menu .account-usage.hidden { display: none; }
.popover.account-menu .account-usage > .material-symbols-outlined { flex: none; font-size: 22px; color: #444746; }
.usage-body { flex: 1; min-width: 0; }
.usage-text { display: block; font-size: 14px; line-height: 20px; color: #1f1f1f; }
.usage-bar { height: 4px; border-radius: 2px; background: #d3dbe5; overflow: hidden; margin-top: 6px; }
.usage-bar span { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 2px; transition: width .3s; }
.account-usage.no-limit .usage-bar { display: none; }
.account-usage.full .usage-bar span { background: #d93025; }
.popover.account-menu .account-activity { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px 6px; font-size: 13px; color: #444746; }
.popover.account-menu .activity-link {
  display: inline; width: auto; min-height: 0; padding: 2px 6px; margin-right: -6px; border-radius: 4px;
  color: var(--blue); font-size: 13px; font-weight: 500; background: transparent;
}
.popover.account-menu .activity-link:hover { background: #e8f0fe; }

/* Activity details window. */
.dialog.activity-dialog { width: min(780px, 94vw); }
#panel-sessions { max-width: 1120px; }
.admin-sessions { max-width: none; }
.sess-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.sess-head h2 { margin: 0 0 4px; }
.sess-head .hint { margin: 0; }
.sess-head .btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px 0 12px; border: 1px solid var(--line); }
.sess-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sess-card .activity-table-wrap { margin: 0; }
.activity-table.sess-table { font-size: 13px; }
.activity-table.sess-table th { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.activity-table.sess-table td { padding: 12px 16px; vertical-align: middle; }
.activity-table.sess-table td, .activity-table.sess-table th { white-space: nowrap; }
.activity-table.sess-table td:first-child { white-space: normal; min-width: 220px; }
.activity-table.sess-table th:last-child, .activity-table.sess-table td:last-child { text-align: right; width: 1%; }
.activity-table.sess-table tbody tr:last-child td { border-bottom: 0; }
.sess-user { display: flex; align-items: center; gap: 12px; }
.sess-user > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.sess-user strong { font-weight: 500; }
.sess-user > span:last-child > span { color: var(--muted); font-size: 12px; }
.sess-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #bdc1c6; }
.sess-dot.on { background: #1e8e3e; }
.sess-now { color: #137333; font-weight: 500; }
.sess-you { display: inline-block; padding: 0 8px; border-radius: 10px; background: #e8f0fe; color: #0b57d0; font-size: 11px; font-weight: 500; line-height: 20px; }
.btn.sess-out, .btn.sess-out-all { height: 30px; padding: 0 14px; border: 1px solid var(--line); border-radius: 15px; font-size: 12px; white-space: nowrap; }
.btn.sess-out:hover, .btn.sess-out-all:hover { background: #e8f0fe; border-color: #c2d5f8; }
.activity-table.sess-table .sess-person { cursor: pointer; }
.activity-table.sess-table .sess-person:hover td { background: #f6f8fc; }
.activity-table.sess-table .sess-person.open td { border-bottom-color: transparent; }
.activity-table.sess-table .sess-browser td { background: #f8fafd; font-size: 12px; color: #444746; }
.activity-table.sess-table .sess-browser.last td { border-bottom: 1px solid var(--line); }
.activity-table.sess-table .sess-toggle { color: var(--muted); }
.activity-table.sess-table .sess-toggle .material-symbols-outlined { display: block; }
.activity-table.sess-table .sess-indent { padding-left: 36px; }
.activity-table.sess-table .sess-all td { text-align: right; padding-top: 4px; }
.sess-foot { margin: 14px 2px 0; }
.activity-body { max-height: min(70vh, 640px); overflow: auto; font-size: 14px; }
.activity-body h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; }
.activity-body #sign-out-others { margin-top: 4px; }
.activity-table-wrap { overflow-x: auto; }
.activity-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.activity-table th, .activity-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.activity-table th { background: #f1f4f9; font-weight: 600; color: #1f1f1f; }
.activity-table th span { font-weight: 400; color: #5f6368; }
.activity-table tr.current td { background: #f8fafd; font-weight: 500; }
.activity-ago { color: #5f6368; font-weight: 400; }
.activity-ended { margin-left: 6px; padding: 1px 6px; border-radius: 8px; background: #f1f3f4; color: #5f6368; font-size: 11px; font-weight: 400; }

/* Meetings: answers, "Send update emails?" and the guest's own copy */
.scrim.ask-over { z-index: 120; }
.dialog.ask .hint { margin: 0 0 8px; }
.cal-attendee-status.ok { background: #0b8043; }
.cal-attendee-status.no { background: #d93025; }
.cal-attendee-status.maybe { background: #f9ab00; }
.cal-guest-sum { color: #5f6368; font-weight: 400; margin-left: 6px; font-size: 12px; }
.cal-rsvp { background: #f1f3f4; border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.cal-rsvp-from { margin: 0 0 8px; color: #3c4043; font-size: 13px; }
.cal-rsvp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-rsvp-row > span { color: #3c4043; font-weight: 500; margin-right: 4px; }
.cal-rsvp-btn {
  border: 1px solid #dadce0; background: #fff; color: #202124; border-radius: 18px;
  height: 32px; padding: 0 16px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.cal-rsvp-btn:hover { background: #f8f9fa; }
.cal-rsvp-btn.on { background: #c2e7ff; border-color: #c2e7ff; color: #001d35; }
.cal-rsvp-btn:disabled { opacity: .6; cursor: default; }
.cal-rsvp .hint { margin: 8px 0 0; }
.invite-actions { align-items: center; }
.invite-going { color: #3c4043; font-weight: 500; margin-right: 4px; }
.invite-btn { display: inline-flex; align-items: center; gap: 4px; }
.invite-btn .material-symbols-outlined { font-size: 18px; }
.invite-btn.maybe.chosen { background: #f9ab00; border-color: #f9ab00; color: #202124; }
.invite-note { margin: -6px 0 12px; color: #5f6368; font-size: 13px; }
.event-chip.needs-reply, .block-event.needs-reply {
  background: #fff !important; color: var(--c) !important; box-shadow: inset 0 0 0 1px var(--c);
}
.event-chip.needs-reply *, .block-event.needs-reply * { color: var(--c) !important; }
.event-chip.tentative, .block-event.tentative {
  background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 6px, transparent 6px 12px) !important;
}
.cal-compose input[readonly], .cal-compose textarea[readonly] { background: #f8f9fa; color: #3c4043; }
.ask-over .dialog.confirm { width: min(500px, 100%); }
.ask-over .dialog-actions .btn { white-space: nowrap; }
.cal-reminder-hint { margin: -4px 0 8px; font-size: 12px; }
.cal-alarm-actions button { white-space: nowrap; }
.ask-over .dialog.confirm { width: min(560px, 100%); }
.ask-over .dialog-actions { flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
.ask-over .dialog-actions .btn { padding-left: 18px; padding-right: 18px; text-align: center; }
/* Compose attachments open on click (Gmail) */
.file-chip-open { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.file-chip.openable .file-chip-open { cursor: pointer; }
.file-chip.openable .file-chip-open:hover .file-chip-name { color: #0b57d0; text-decoration: underline; }
.file-chip.openable .file-chip-open:focus-visible { outline: 2px solid #0b57d0; outline-offset: 2px; border-radius: 4px; }
/* Menus inside menus (Move to, Snooze) open beside their row, like Gmail */
.popover.submenu { z-index: 61; }
.popover .sub-arrow { margin-left: auto; display: inline-flex; }
.popover .sub-arrow .material-symbols-outlined { font-size: 18px; color: #5f6368; }
.popover button.sub-open { background: #e8eaed; }
.popover.move-menu { width: 260px; min-width: 260px; padding: 8px 0; overflow: visible; display: flex; flex-direction: column; max-height: min(480px, calc(100vh - 16px)); }
.move-title { padding: 4px 16px 6px; color: #202124; font-size: 14px; }
.move-search { display: flex; align-items: center; gap: 6px; margin: 0 16px 6px; border-bottom: 1px solid #747775; padding: 2px 0; }
.move-search:focus-within { border-bottom: 2px solid #0b57d0; padding-bottom: 1px; }
.move-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 14px; padding: 4px 0; background: transparent; }
.move-search .material-symbols-outlined { order: 2; font-size: 20px; color: #444746; }
.move-list { overflow-y: auto; min-height: 0; flex: 1 1 auto; max-height: 300px; }
.move-list button[hidden] { display: none; }
.move-empty { margin: 6px 16px; color: #5f6368; font-size: 13px; }
.move-held { flex: none; }
.move-held[hidden], .popover .menu-sep[hidden] { display: none; }
.move-held button[hidden] { display: none; }
/* The Move to menu is a flex column: keep its dividers a full 1px (they were being squeezed thinner). */
.popover.move-menu > .menu-sep, .popover.move-menu > .move-title, .popover.move-menu > .move-search,
.popover.move-menu > button { flex: none; }
/* Settings > Appearance: Light / Dark / System */
.theme-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 640px; margin: 8px 0 12px; }
.theme-choice {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px;
  border: 1px solid #c4c7c5; border-radius: 10px; background: #fff; color: #1f1f1f; font-size: 15px; font-weight: 500;
}
.theme-choice:hover { background: #f1f3f4; }
.theme-choice.on { border: 2px solid #0b57d0; background: #e8f0fe; color: #041e49; }
.theme-choice .material-symbols-outlined { font-size: 22px; }
@media (max-width: 560px) { .theme-choices { grid-template-columns: 1fr; } }

/* Custom recurrence editor (Google's "Custom recurrence" window) */
.repeat-editor { width: min(420px, 100%); }
.repeat-editor .rep-row { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 14px; color: #202124; }
.repeat-editor .rep-row[hidden] { display: none; }
.repeat-editor .rep-label { min-width: 96px; color: #444746; }
.repeat-editor #rep-n { width: 64px; }
.repeat-editor select, .repeat-editor input[type=number], .repeat-editor input[type=date] {
  height: 36px; padding: 0 10px; border: 1px solid #c4c7c5; border-radius: 8px; background: #fff; color: #202124; font: inherit; box-sizing: border-box;
}
.repeat-editor #rep-month select { width: 100%; }
.repeat-editor .rep-days { flex-wrap: wrap; }
.repeat-editor .rep-day-list { display: flex; gap: 6px; }
.repeat-editor .rep-day {
  width: 30px; height: 30px; border-radius: 50%; border: 0; background: #f1f3f4; color: #444746; display: inline-grid; place-items: center; font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1; cursor: pointer; padding: 0;
}
.repeat-editor .rep-day.on { background: #0b57d0; color: #fff; }
.repeat-editor .rep-day:focus-visible { outline: 2px solid #0b57d0; outline-offset: 2px; }
.repeat-editor .rep-ends { display: grid; gap: 10px; margin: 4px 0 8px; font-size: 14px; color: #202124; }
.repeat-editor .rep-ends label { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.repeat-editor #rep-count { width: 72px; }
.repeat-editor #rep-unit { width: 120px; flex: 0 0 auto; }
.repeat-editor #rep-until { width: 170px; flex: 0 0 auto; }
.repeat-editor #rep-n, .repeat-editor #rep-count { flex: 0 0 auto; }
.repeat-editor #rep-n, .repeat-editor #rep-unit, .repeat-editor #rep-month-mode, .repeat-editor #rep-until, .repeat-editor #rep-count { height: 40px; margin: 0; }
.cal-links-name { margin: -4px 0 4px; }
.cal-links-title { margin: 18px 0 8px; font-size: 14px; font-weight: 500; color: #202124; }
.dialog .link-row input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { width: auto; flex: 1 1 auto; min-width: 0; }
.dialog .link-row .btn { flex: 0 0 auto; }

/* Find a time (free/busy) in the event window, laid out like SOGo's */
.fb { margin: 12px 0 6px; border: 1px solid #dadce0; border-radius: 12px; padding: 12px 14px 10px; background: #fff; }
.fb[hidden] { display: none; }
.fb-head { display: flex; align-items: center; margin-bottom: 8px; }
.fb-title { font-size: 14px; font-weight: 500; color: #202124; margin-right: auto; }
.fb-daynav { display: inline-flex; align-items: center; gap: 2px; }
.fb-day { min-width: 140px; text-align: center; font-size: 13px; color: #202124; }
.fb-nav { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #444746; cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.fb-nav:hover { background: #f1f3f4; }
.fb-grid { position: relative; }
.fb-row { display: flex; align-items: stretch; min-height: 48px; border-bottom: 1px solid #e8eaed; }
.fb-row:last-of-type { border-bottom: 0; }
.fb-hours { min-height: 22px; border-bottom: 1px solid #dadce0; }
.fb-who { flex: 0 0 168px; display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 10px; }
.fb-face { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 13px; font-weight: 500; line-height: 1; }
.fb-names { display: flex; flex-direction: column; min-width: 0; line-height: 16px; }
.fb-names strong { font-size: 13px; font-weight: 500; color: #202124; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-names small { font-size: 11px; color: #5f6368; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-track { position: relative; flex: 1; min-width: 0; cursor: pointer; overflow: hidden; }
.fb-hours .fb-track { cursor: default; overflow: visible; }
.fb-hour { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: 11px; color: #5f6368; white-space: nowrap; }
.fb-hour:first-child { transform: none; }
.fb-work { position: absolute; top: 0; bottom: 0; background: #f8f9fa; }
.fb-line { position: absolute; top: 0; bottom: 0; width: 1px; background: #f1f3f4; }
.fb-line.major { background: #e8eaed; }
.fb-busy { position: absolute; top: 9px; bottom: 9px; background: #7aa0d4; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.fb-unknown { background: repeating-linear-gradient(135deg, rgba(128, 134, 139, 0.16) 0 5px, transparent 5px 10px); }
.fb-unknown .fb-work { display: none; }
.fb-none { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #5f6368; pointer-events: none; background: #fff; padding: 1px 6px; border-radius: 4px; }
.fb-pick-col { position: absolute; top: 22px; bottom: 0; left: 168px; right: 0; pointer-events: none; }
.fb-pick { position: absolute; top: 0; bottom: 0; min-width: 3px; background: rgba(11, 87, 208, 0.14); border-left: 2px solid #0b57d0; border-right: 2px solid #0b57d0; box-sizing: border-box; }
.fb-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 10px; font-size: 11px; color: #5f6368; }
.fb-key { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-left: 10px; }
.fb-key:first-child { margin-left: 0; }
.fb-key.busy { background: #7aa0d4; }
.fb-key.none { background: repeating-linear-gradient(135deg, rgba(128, 134, 139, 0.3) 0 3px, transparent 3px 6px); border: 1px solid #dadce0; }
.fb-key.pick { background: rgba(11, 87, 208, 0.14); border-left: 2px solid #0b57d0; border-right: 2px solid #0b57d0; }
.fb-key.work { background: #f8f9fa; border: 1px solid #dadce0; }
@media (max-width: 640px) { .fb-who { flex-basis: 92px; } .fb-names small { display: none; } .fb-pick-col { left: 92px; } }

/* ---- Plugins: Settings > Plugins (admin), account menu > Plugins (user) ---- */
.m3-switch { position: relative; display: inline-flex; flex: none; width: 52px; height: 32px; cursor: pointer; }
.settings label.m3-switch { display: inline-flex; margin: 0; }
.m3-switch input, .settings .m3-switch input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
  opacity: 0; cursor: pointer; z-index: 1;
}
.m3-switch-track {
  position: absolute; inset: 0; border-radius: 16px; border: 2px solid #747775; background: #e1e3e1;
  transition: background .15s, border-color .15s;
}
.m3-switch-handle {
  position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: #747775;
  display: flex; align-items: center; justify-content: center; color: transparent;
  transition: left .15s, top .15s, width .15s, height .15s, background .15s;
}
.m3-switch-handle .material-symbols-outlined { font-size: 16px; }
.m3-switch input:checked + .m3-switch-track { background: #0b57d0; border-color: #0b57d0; }
.m3-switch input:checked + .m3-switch-track .m3-switch-handle { top: 2px; left: 22px; width: 24px; height: 24px; background: #fff; color: #0b57d0; }
.m3-switch:hover input:not(:disabled) + .m3-switch-track { box-shadow: 0 0 0 8px rgba(11, 87, 208, .08); }
.m3-switch input:focus-visible + .m3-switch-track { outline: 2px solid var(--blue); outline-offset: 2px; }
.m3-switch.disabled { opacity: .38; cursor: default; }
.m3-switch.disabled input { cursor: default; }

.plg-list { display: flex; flex-direction: column; gap: 12px; }
.plg-card {
  display: flex; align-items: flex-start; gap: 16px; padding: 20px; border: 1px solid var(--line);
  border-radius: 16px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.plg-card:hover { box-shadow: 0 1px 2px rgba(60, 64, 67, .15), 0 1px 3px 1px rgba(60, 64, 67, .08); }
.plg-card.on { border-color: #a8c7fa; }
.plg-card.broken { border-color: #f5c2c0; }
.plg-icon {
  flex: none; width: 48px; height: 48px; border-radius: 12px; background: #e8f0fe; color: #0b57d0;
  display: inline-flex; align-items: center; justify-content: center;
}
.plg-icon .material-symbols-outlined { font-size: 26px; }
.plg-icon-lg { width: 64px; height: 64px; border-radius: 16px; }
.plg-icon-lg .material-symbols-outlined { font-size: 34px; }
.plg-card.broken .plg-icon { background: #fce8e6; color: #b3261e; }
.plg-main { flex: 1; min-width: 0; }
.plg-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 24px; }
.plg-title strong { font-size: 16px; font-weight: 500; line-height: 24px; }
.plg-version { color: var(--muted); font-size: 12px; }
.plg-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 11px;
  background: #f1f3f4; color: #444746; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.plg-chip.ok { background: #e6f4ea; color: #137333; }
.plg-chip.bad { background: #fce8e6; color: #b3261e; }
.plg-desc { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.plg-side { flex: none; display: flex; align-items: center; min-height: 48px; }
.plg-stats { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.plg-stat { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; }
.plg-stat-label { color: var(--muted); min-width: 110px; }
.plg-stat-value { color: var(--text); min-width: 0; }
.plg-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #c4c7c5; }
.plg-dot.ok { background: #188038; }
.plg-dot.bad { background: #d93025; }
/* Status colours stay green/red in dark mode too (the generator only maps greys). */
html[data-mode="dark"] .plg-dot.ok { background: #81c995; }
html[data-mode="dark"] .plg-dot.bad { background: #f2b8b5; }
.plg-foot { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 16px; }
.plg-card code, .admin-plugins .sess-foot code, .plg-empty code, .mcp-section code {
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
  background: #f1f3f4; border-radius: 4px; padding: 1px 5px;
}
.plg-error {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 8px;
  background: #fce8e6; color: #b3261e; font-size: 13px; line-height: 18px;
}
.plg-error .material-symbols-outlined { font-size: 18px; }
.plg-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 24px; text-align: center;
  border: 1px dashed #c4c7c5; border-radius: 16px; color: var(--muted); font-size: 13px; line-height: 18px;
}
.plg-empty > .material-symbols-outlined { font-size: 40px; color: #c4c7c5; margin-bottom: 6px; }
.plg-empty strong { color: var(--text); font-size: 15px; font-weight: 500; }
.plg-empty .btn { margin-top: 10px; border: 1px solid var(--line); }
.plg-empty.slim { padding: 28px 20px; }
.plg-open { display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 12px 0 0 -12px; padding: 0 16px 0 12px; }
.plg-open .material-symbols-outlined { font-size: 18px; }
.plugins-page .plg-intro { border-top: 0; padding: 12px 0 20px; }
.plugins-page .plg-intro h2 { margin-bottom: 6px; }
.plugins-page .plg-intro .hint { margin: 0; font-size: 13px; line-height: 20px; }
.plg-hero { display: flex; align-items: flex-start; gap: 20px; padding: 16px 0 28px; }
.plg-hero-text { flex: 1; min-width: 0; }
.plg-hero .plg-title strong { font-size: 22px; font-weight: 400; line-height: 28px; }
.plg-panel { border-top: 1px solid var(--line); }
.plg-panel > .plg-empty { margin-top: 28px; }
.plg-panel > .hint { padding-top: 20px; }
.plg-muted { color: var(--muted); }

/* Claude for Webmail (plugins/mcp) */
.mcp-section .sess-head { margin-bottom: 16px; }
.mcp-copy-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.mcp-section .plg-error { margin: 0 0 16px; }
.mcp-steps + .hint { margin-top: 16px; line-height: 18px; }
.mcp-steps + .hint code { word-break: break-all; }
.mcp-copy-row input { flex: 1; font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.mcp-copy-row .btn { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1px solid var(--line); height: 40px; padding: 0 16px 0 12px; }
.mcp-copy-row .btn .material-symbols-outlined { font-size: 18px; }
.mcp-app-name { display: flex; flex-direction: column; gap: 2px; }
.mcp-app-name strong { font-weight: 500; }
.mcp-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; line-height: 20px; }
.mcp-steps li::marker { color: var(--muted); }
.mcp-perms { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.mcp-perms li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.mcp-perms li + li { border-top: 1px solid var(--line); }
.mcp-perms li > .material-symbols-outlined { flex: none; color: #137333; }
.mcp-perms li.no > .material-symbols-outlined { color: #b3261e; }
.mcp-perms li div:not(.mcp-perm-side) { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mcp-perms li strong { font-weight: 500; font-size: 14px; }
.mcp-perms li div:not(.mcp-perm-side) span { color: var(--muted); font-size: 12px; line-height: 16px; }
.mcp-perm-side { flex: none; display: flex; align-items: center; }
.mcp-section > .hint + .mcp-perms { margin-top: 12px; }
.mcp-fields { margin-top: 8px; }
.mcp-save { display: flex; justify-content: flex-end; margin-top: 16px; }
.mcp-save .btn.primary { min-width: 96px; }
@media (max-width: 640px) {
  .plg-card { flex-wrap: wrap; padding: 16px; }
  .plg-side { min-height: 0; margin-left: auto; }
  .plg-hero { flex-wrap: wrap; }
  .plg-stat { flex-wrap: wrap; }
  .plg-stat-label { min-width: 0; }
}

/* Claude for Webmail: the Allow page Claude opens (plugins/mcp/templates) */
.consent-card .login-sub strong { color: var(--text); font-weight: 500; }
.consent-list { list-style: none; margin: 0 0 20px; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.consent-list li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: 14px; line-height: 20px; }
.consent-list li + li { border-top: 1px solid var(--line); }
.consent-list li .material-symbols-outlined { color: #137333; }
.consent-list li.no .material-symbols-outlined { color: #b3261e; }
.consent-note { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 18px; }
.consent-actions { gap: 8px; }
.consent-actions .btn:not(.primary) { border: 1px solid var(--line); }
.consent-card a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.consent-card .login-sub a { color: var(--blue); }
.consent-error {
  display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 24px; padding: 12px 14px; border-radius: 8px;
  background: #fce8e6; color: #b3261e; font-size: 14px; line-height: 20px;
}

/* New folder / Edit folder: "Put inside another folder" */
.dialog.folder-dialog .check-line { margin-top: 12px; }
.dialog.folder-dialog select { width: 100%; }
.dialog.folder-dialog select:disabled { opacity: .55; cursor: default; }
