/* Posta — sage theme, Commissioner type */
@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/commissioner-greek-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/commissioner-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/commissioner-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: "Commissioner", "Segoe UI", system-ui, sans-serif;
  /* palette: Φασκόμηλο */
  --canvas: #edf1ed;
  --surface: #ffffff;
  --ink: #243029;
  --muted: #69766d;
  --faint: #a2ada5;
  --accent: #6f9a80;
  --accent-ink: #466f58;
  --primary: #5e8f74;
  --primary-hover: #4f7d62;
  --wash: #e4eee7;
  --line: #e2e8e3;
  --line-strong: #d0d9d2;
  --hover: rgba(111, 154, 128, 0.09);
  --field: #f2f6f3;
  --flag: #d99a4e;
  --danger: #c95b5b;
  --shadow: 0 1px 2px rgba(36, 48, 41, 0.05), 0 8px 28px rgba(36, 48, 41, 0.07);
  --pop: 0 18px 50px rgba(36, 48, 41, 0.2), 0 0 0 1px rgba(36, 48, 41, 0.06);
  --on-accent: #ffffff;
  color-scheme: light only;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  font-feature-settings: "ss01";
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; display: block; }
.subtle { color: var(--muted); font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--wash); }

/* ---------- Buttons ---------- */
.icon-btn {
  border: 0; background: transparent; width: 34px; height: 32px; border-radius: 10px;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); flex: none;
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn.active { color: var(--accent-ink); background: var(--wash); }
.icon-btn:disabled { opacity: 0.35; pointer-events: none; }
.btn {
  border: 0; border-radius: 10px; padding: 7px 14px; background: var(--field); cursor: pointer; font-weight: 550;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.btn:hover { background: var(--wash); }
.btn svg.i { width: 16px; height: 16px; }
.btn.primary { background: var(--primary); color: var(--on-accent); }
.btn.primary:hover { background: var(--primary-hover); color: var(--on-accent); }
.btn.soft { background: var(--wash); color: var(--accent-ink); }
.btn.soft:hover { background: var(--primary); color: var(--on-accent); }
.btn.danger { color: var(--danger); }
.btn.wide { width: 100%; justify-content: center; padding: 10px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 2px; }
.brand img { width: 28px; height: 28px; }
.brand span { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Login ---------- */
.login { height: 100%; display: grid; place-items: center; background: var(--canvas); padding: 16px; }
.login-card {
  width: min(360px, 100%); background: var(--surface); border-radius: 22px; padding: 36px 30px 28px;
  box-shadow: var(--shadow); display: grid; gap: 14px;
}
.login-icon { width: 52px; height: 52px; }
.login-card h1 { margin: 6px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.login-card p { margin: 0 0 4px; color: var(--muted); }
.login-card input { padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--field); outline: none; font-size: 15px; }
.login-card input:focus { border-color: var(--accent); background: var(--surface); }
.login-error { color: var(--danger); min-height: 18px; }

/* ---------- Layout ---------- */
.app {
  display: grid; grid-template-columns: 248px 380px 1fr; gap: 10px; height: 100%; height: 100dvh; padding: 10px 10px 10px 0;
}
.sidebar { overflow-y: auto; padding: 10px 10px 70px 12px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.list-pane, .reader {
  display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.mobile-only { display: none !important; }

/* ---------- Sidebar ---------- */
.sb-top { display: grid; gap: 14px; }
.sb-section { display: flex; flex-direction: column; gap: 2px; }
.sb-title {
  font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 10px 6px; display: flex; align-items: center; gap: 7px; user-select: none;
}
.sb-title[data-collapse] { cursor: pointer; }
.sb-title .chev { width: 12px; height: 12px; transition: transform 0.15s; }
.sb-title.collapsed .chev { transform: rotate(-90deg); }
.sb-title .dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.sb-title .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.sb-title .warn { color: var(--danger); font-weight: 700; }
.sb-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; cursor: pointer; user-select: none;
  color: var(--ink); min-height: 32px;
}
.sb-item:hover { background: var(--hover); }
.sb-item.selected { background: var(--wash); color: var(--accent-ink); font-weight: 600; }
.sb-item svg.i { color: var(--muted); width: 17px; height: 17px; }
.sb-item.selected svg.i { color: var(--accent-ink); }
.sb-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-item .badge {
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent-ink); background: var(--wash);
  padding: 1px 7px; border-radius: 99px; min-width: 22px; text-align: center;
}
.sb-item.selected .badge { background: var(--surface); }
.sb-item.child { padding-left: 30px; }
.sb-item.child .acct-mark { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.sb-item.drop-target { background: var(--wash); outline: 2px dashed var(--accent); outline-offset: -2px; }
.sb-footer {
  position: fixed; bottom: 10px; left: 10px; width: 228px; padding: 6px; display: flex; gap: 2px;
  background: var(--canvas); border-radius: 12px;
}
.sb-error { color: var(--danger); font-size: 11.5px; padding: 0 10px 6px 26px; }

/* ---------- List ---------- */
.list-header { display: flex; align-items: center; gap: 4px; padding: 16px 12px 8px 20px; }
.list-title { flex: 1; min-width: 0; }
.list-title h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-title .subtle { margin-top: 1px; }
.search-wrap { padding: 4px 14px 10px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--field); border-radius: 12px; padding: 0 12px; height: 36px; border: 1px solid transparent; }
.search .search-icon { color: var(--muted); }
.search .search-icon svg.i { width: 15px; height: 15px; }
.search input { flex: 1; border: 0; background: transparent; outline: none; height: 100%; }
.search:focus-within { border-color: var(--accent); background: var(--surface); }
.list { flex: 1; overflow-y: auto; outline: none; padding: 0 8px 12px; }
.row {
  display: flex; gap: 12px; padding: 11px 12px; position: relative; cursor: pointer; user-select: none; border-radius: 14px;
}
.row + .row { margin-top: 1px; }
.row:hover { background: var(--hover); }
.row.selected { background: var(--wash); }
.row.multi { background: var(--wash); box-shadow: inset 0 0 0 1.5px var(--accent); }
.row.unread::before {
  content: ""; position: absolute; left: 2px; top: 16px; width: 4px; height: 22px; border-radius: 4px; background: var(--accent);
}
.row-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 650; font-size: 13.5px; position: relative;
}
.row-avatar .acct-mark {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 4px; border: 2px solid var(--surface);
}
.row.selected .row-avatar .acct-mark, .row:hover .row-avatar .acct-mark { border-color: var(--wash); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-top { display: flex; align-items: baseline; gap: 8px; }
.row-from { flex: 1; font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.unread .row-from { font-weight: 700; }
.row-date { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row.unread .row-date { color: var(--accent-ink); font-weight: 600; }
.row-subject { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.row.unread .row-subject { font-weight: 600; }
.row-subject span { overflow: hidden; text-overflow: ellipsis; }
.row-subject svg.i { width: 13px; height: 13px; color: var(--muted); }
.row-subject .flag svg.i { color: var(--flag); }
.row-snippet {
  color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; font-size: 13px;
}
.list-empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.list-more { padding: 14px; text-align: center; color: var(--muted); }
.list-errors { margin: 0 6px 8px; padding: 10px 12px; color: var(--danger); font-size: 12px; background: var(--field); border-radius: 10px; }
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Reader ---------- */
.reader-toolbar { display: flex; align-items: center; gap: 4px; padding: 12px 16px; min-height: 58px; }
.reader-toolbar .spacer { flex: 1; }
.tool-group { display: flex; gap: 2px; background: var(--field); border-radius: 12px; padding: 2px; }
.tool-group .icon-btn:hover { background: var(--surface); }
.reader-body { flex: 1; overflow-y: auto; }
.reader-empty { flex: 1; display: grid; place-items: center; color: var(--faint); font-size: 15px; text-align: center; padding: 24px; }
.reader-empty svg.i { width: 44px; height: 44px; margin: 0 auto 10px; color: var(--line-strong); stroke-width: 1.2; }
.msg-head { padding: 6px 32px 18px; display: grid; gap: 14px; }
.msg-subject { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
.msg-sender { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 650; font-size: 15px;
}
.msg-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.msg-from-line { display: flex; gap: 10px; align-items: baseline; }
.msg-from { font-weight: 650; font-size: 14.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-from .addr { font-weight: 400; color: var(--muted); font-size: 13px; }
.msg-date { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.msg-rcpt { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-account { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: var(--field); border-radius: 99px; padding: 2px 10px 2px 8px; justify-self: start; }
.acct-dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; flex: none; }
.remote-bar {
  margin: 0 32px 4px; padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--wash); display: flex; align-items: center; gap: 12px;
  color: var(--accent-ink); font-size: 13px;
}
.remote-bar span { flex: 1; }
.remote-bar .btn { background: var(--surface); }
.msg-frame-wrap { padding: 10px 32px 20px; }
.msg-frame-wrap.html { padding: 10px 20px 20px; }
.msg-frame { width: 100%; border: 0; display: block; min-height: 120px; background: transparent; border-radius: 12px; }
.msg-frame.white { background: #fff; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 32px 32px; }
.att {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; border: 1px solid var(--line-strong);
  text-decoration: none; color: var(--ink); max-width: 300px;
}
.att:hover { border-color: var(--accent); background: var(--hover); }
.att .att-icon {
  width: 36px; height: 36px; border-radius: 9px; background: var(--wash); display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: var(--accent-ink); flex: none;
}
.att .att-name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .att-size { color: var(--muted); font-size: 12px; }
.att-text { min-width: 0; }

/* ---------- Menus ---------- */
.menu {
  position: fixed; z-index: 50; background: var(--surface); border-radius: 14px; box-shadow: var(--pop); padding: 6px;
  min-width: 220px; max-height: 60vh; overflow-y: auto;
}
.menu-item { padding: 7px 10px; border-radius: 9px; cursor: pointer; white-space: nowrap; display: flex; gap: 10px; align-items: center; }
.menu-item:hover { background: var(--wash); color: var(--accent-ink); }
.menu-item svg.i { width: 16px; height: 16px; color: var(--muted); }
.menu-head { padding: 6px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---------- Modals ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 30, 24, 0.32); z-index: 48; display: grid; place-items: center; padding: 16px; }
.sheet {
  background: var(--surface); border-radius: 20px; box-shadow: var(--pop); width: min(560px, 100%); max-height: 90vh; overflow: auto;
  display: flex; flex-direction: column;
}
.sheet header { display: flex; align-items: center; gap: 8px; padding: 18px 20px 6px 24px; }
.sheet header h3 { margin: 0; font-size: 17px; font-weight: 700; flex: 1; }
.sheet .sheet-body { padding: 14px 24px 20px; display: grid; gap: 14px; }
.sheet footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px 20px; }
.field { display: grid; gap: 5px; min-width: 0; }
.sheet .sheet-body > * { min-width: 0; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.field input, .field select {
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--field); outline: none;
  width: 100%; min-width: 0;
}
.field input:focus, .field select:focus { border-color: var(--accent); background: var(--surface); }
.grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.hint { font-size: 13px; color: var(--ink); line-height: 1.5; background: var(--wash); padding: 12px 14px; border-radius: 12px; }
.hint a { color: var(--accent-ink); font-weight: 600; }
.hint.warn { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.form-error { color: var(--danger); white-space: pre-wrap; font-size: 12.5px; }
.form-error:empty { display: none; }
.providers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.provider {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 14px; padding: 14px 16px; font-size: 14.5px; font-weight: 650;
  cursor: pointer; text-align: left; display: flex; align-items: center; gap: 12px;
}
.provider:hover { border-color: var(--accent); background: var(--hover); }
.provider .pdot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.provider small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.acct-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.acct-row .dot { width: 10px; height: 10px; border-radius: 3px; }
.acct-row .info { flex: 1; min-width: 0; }
.acct-row .info div:first-child { font-weight: 600; }
.acct-row .info div:last-child { color: var(--muted); font-size: 12.5px; }
details summary { cursor: pointer; color: var(--accent-ink); font-size: 13px; font-weight: 550; }
.colors { display: flex; gap: 8px; }
.colors button { width: 24px; height: 24px; border-radius: 8px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.colors button.sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.check { display: flex; gap: 8px; align-items: center; }
.check input { accent-color: var(--accent); }

/* ---------- Compose ---------- */
.compose {
  position: fixed; z-index: 45; right: 20px; bottom: 20px; width: min(700px, calc(100vw - 40px)); height: min(640px, calc(100vh - 40px));
  background: var(--surface); border-radius: 20px; box-shadow: var(--pop); display: flex; flex-direction: column; overflow: hidden;
}
.compose.dragover { outline: 3px dashed var(--accent); outline-offset: -8px; }
.compose-top { display: flex; align-items: center; gap: 6px; padding: 14px 14px 10px 22px; }
.compose-top .title { flex: 1; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compose-top .draft-state { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 700px) { .compose-top .draft-state { display: none; } }
.compose-fields { margin: 0 16px; background: var(--field); border-radius: 14px; }
.cf { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 40px; position: relative; }
.cf + .cf { border-top: 1px solid var(--line); }
.cf label { color: var(--muted); width: 74px; flex: none; font-size: 13px; }
.cf input, .cf select { flex: 1; border: 0; outline: none; background: transparent; padding: 9px 0; min-width: 0; }
.cf .link { color: var(--accent-ink); background: none; border: 0; font-size: 12.5px; font-weight: 550; cursor: pointer; }
.suggest { position: absolute; left: 94px; top: 100%; z-index: 5; background: var(--surface); box-shadow: var(--pop); border-radius: 12px; padding: 5px; min-width: 280px; }
.suggest div { padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.suggest div.on, .suggest div:hover { background: var(--wash); color: var(--accent-ink); }
.suggest small { color: var(--muted); }
.fmt { display: flex; gap: 2px; padding: 8px 14px 0; }
.fmt .icon-btn { width: 32px; font-weight: 700; font-size: 14px; }
.editor { flex: 1; overflow-y: auto; padding: 12px 24px 16px; outline: none; font-size: 14.5px; line-height: 1.6; }
.editor blockquote { margin: 10px 0 0; padding-left: 14px; border-left: 3px solid var(--accent); color: var(--muted); }
.editor img { max-width: 100%; }
.compose-atts { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 20px; border-top: 1px solid var(--line); }
.compose-atts:empty { display: none; }
.chip { background: var(--wash); color: var(--accent-ink); border-radius: 9px; padding: 5px 6px 5px 10px; display: flex; gap: 6px; align-items: center; font-size: 12.5px; }
.chip svg.i { width: 13px; height: 13px; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 12px; font-size: 13.5px; z-index: 60;
  transition: opacity 0.2s, transform 0.2s; max-width: 90vw; display: flex; gap: 12px; align-items: center; white-space: pre-wrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.error { background: var(--danger); color: #fff; }
.toast button { border: 0; background: none; color: var(--accent); font-weight: 650; }
@media (prefers-reduced-motion: reduce) { .toast, .sb-title .chev { transition: none; } .spinner { animation-duration: 2s; } }

/* ---------- Responsive ---------- */
@media (max-width: 1150px) {
  .app { grid-template-columns: 220px 330px 1fr; }
  .sb-footer { width: 200px; }
}
@media (max-width: 880px) {
  .app { grid-template-columns: 320px 1fr; padding-left: 10px; }
  .app .sidebar { display: none; }
  .app[data-pane="sidebar"] .sidebar {
    display: flex; position: fixed; inset: 0 auto 0 0; width: 290px; z-index: 30; background: var(--canvas); box-shadow: var(--pop); padding-top: 16px;
  }
  .sb-footer { width: 270px; }
  .list-header .mobile-only { display: inline-grid !important; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  /* 16px+ stops iOS from zooming into fields */
  input, select, textarea, .editor, .cf input, .cf select, .search input, .field input, .field select { font-size: 16px !important; }
  .app { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .list-pane, .reader { border-radius: 0; box-shadow: none; }
  .app .list-pane, .app .reader { display: none; }
  .app[data-pane="list"] .list-pane, .app[data-pane="sidebar"] .list-pane { display: flex; }
  .app[data-pane="reader"] .reader { display: flex; }
  .app[data-pane="sidebar"] .sidebar { width: 100%; box-shadow: none; padding: max(16px, env(safe-area-inset-top)) 14px 90px; }
  .sb-footer { width: calc(100% - 20px); bottom: max(10px, env(safe-area-inset-bottom)); }
  .mobile-only { display: inline-grid !important; }
  .desktop-only { display: none !important; }
  .icon-btn { width: 42px; height: 40px; border-radius: 12px; }
  .icon-btn svg.i { width: 21px; height: 21px; }

  /* sidebar as a full screen of mailboxes */
  .brand { padding-right: 0; }
  .sb-close { margin-left: auto; }
  .sb-item { min-height: 46px; font-size: 16.5px; padding: 8px 12px; }
  .sb-item svg.i { width: 20px; height: 20px; }

  /* list */
  .list-header { padding: max(14px, env(safe-area-inset-top)) 10px 6px 14px; }
  .list-title h2 { font-size: 28px; }
  .search { height: 40px; border-radius: 12px; }
  .list { padding: 0 6px 110px; }
  .row { padding: 12px 12px; gap: 13px; border-radius: 0; }
  .row-wrap + .row-wrap .row { box-shadow: inset 0 1px 0 var(--line); }
  .row-avatar { width: 44px; height: 44px; font-size: 15px; }
  .row-from { font-size: 16.5px; }
  .row-subject { font-size: 15px; }
  .row-snippet { font-size: 14.5px; }
  .row.selected { background: transparent; }
  .row:hover { background: transparent; }
  .row:active { background: var(--hover); }
  .fab {
    position: fixed; right: 18px; bottom: calc(22px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 20px; border: 0;
    background: var(--primary); color: var(--on-accent); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22); place-items: center; z-index: 20;
  }
  .fab svg.i { width: 25px; height: 25px; }
  .app[data-pane="sidebar"] .fab { display: none !important; }

  /* reader: back on top, actions at the bottom within thumb reach */
  .reader-mtop { display: flex; padding: max(8px, env(safe-area-inset-top)) 6px 2px; }
  .mback { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--accent-ink); font-size: 16.5px; font-weight: 550; padding: 8px 10px 8px 4px; }
  .mback svg.i { width: 24px; height: 24px; }
  .reader-body { order: 1; }
  .reader-toolbar {
    order: 2; justify-content: space-between; gap: 0; min-height: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--surface);
  }
  .reader-toolbar .spacer { display: none; }
  .tool-group { background: none; padding: 0; gap: 0; }
  .reader-toolbar [data-act="junk"] { display: none; }
  .msg-head { padding: 4px 18px 16px; }
  .msg-subject { font-size: 22px; }
  .msg-from-line { flex-direction: column; gap: 0; }
  .remote-bar { margin: 0 14px 4px; flex-wrap: wrap; }
  .msg-frame-wrap { padding: 8px 18px 18px; }
  .msg-frame-wrap.html { padding: 6px 6px 16px; }
  .attachments { padding: 4px 18px 28px; }
  .att { max-width: 100%; }

  /* compose & sheets */
  .compose { inset: 0; width: 100%; height: 100%; border-radius: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .compose-fields { margin: 0 10px; }
  .cf label { width: 64px; }
  .overlay { place-items: end center; padding: 0; }
  .sheet { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .sheet header { padding-top: 20px; }
  .menu { min-width: 240px; }
  .menu-item { padding: 12px 12px; font-size: 16px; }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .providers { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid2 .field:first-child { grid-column: 1 / -1; }

  /* swipe actions */
  .swipe-bg { display: flex; }
}

/* ---------- Avatars (soft tints from the sender's hue) ---------- */
.row-avatar, .avatar { background: hsl(var(--h, 145) 55% 91%); color: hsl(var(--h, 145) 38% 36%); }

/* ---------- Google sign-in ---------- */
.google-btn { padding: 12px; font-size: 14.5px; }
.google-note { margin: -4px 0 0; color: var(--muted); font-size: 12.5px; text-align: center; }
.alt-login { border-top: 1px solid var(--line); padding-top: 12px; }
.alt-login .alt-body { display: grid; gap: 14px; margin-top: 12px; }

/* ---------- Mobile helpers (hidden on desktop) ---------- */
.reader-mtop, .fab, .ptr { display: none; }
.row-wrap { position: relative; overflow: hidden; border-radius: 14px; }
.row-wrap .row { background: var(--surface); }
.row-wrap .row.selected { background: var(--wash); }
.row-wrap .row:hover { background: var(--hover); }
.swipe-bg {
  display: none; position: absolute; inset: 0; align-items: center; justify-content: space-between; padding: 0 22px;
  font-weight: 650; font-size: 14px; color: #fff; opacity: 0; transition: opacity 0.15s;
}
.swipe-bg span { display: none; align-items: center; gap: 8px; }
.row-wrap.swiping .swipe-bg { opacity: 1; }
.row-wrap.swiping[data-dir="left"] .swipe-bg { background: var(--faint); justify-content: flex-end; }
.row-wrap.swiping[data-dir="left"] .sw-left { display: inline-flex; }
.row-wrap.swiping[data-dir="right"] .swipe-bg { background: var(--faint); }
.row-wrap.swiping[data-dir="right"] .sw-right { display: inline-flex; }
.row-wrap.armed[data-dir="left"] .swipe-bg { background: var(--primary); }
.row-wrap.armed[data-dir="right"] .swipe-bg { background: #6a96b8; }
@media (max-width: 640px) {
  .ptr {
    display: flex; position: absolute; left: 0; right: 0; top: calc(118px + env(safe-area-inset-top)); justify-content: center; align-items: center; gap: 8px;
    color: var(--muted); font-size: 13px; opacity: 0; pointer-events: none; z-index: 0;
  }
  .ptr.armed { color: var(--accent-ink); }
  .ptr.armed svg { transform: rotate(180deg); transition: transform 0.2s; }
  .list-pane { position: relative; }
  .list { position: relative; z-index: 1; background: var(--surface); }
  .row-wrap { border-radius: 0; }
}

/* ---------- Settings ---------- */
.set-h { margin: 10px 0 -2px; font-size: 13px; font-weight: 650; color: var(--muted); }
.set-h:first-child { margin-top: 0; }
.set-p { margin: 0; line-height: 1.5; }
.set-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.set-ol { margin: 6px 0 0; padding-left: 20px; line-height: 1.6; }

/* ---------- Colourful mailbox icons ---------- */
.sb-item.ic-inbox svg.i { color: var(--accent); }
.sb-item.ic-sent svg.i { color: #6a96b8; }
.sb-item.ic-drafts svg.i { color: #b39a63; }
.sb-item.ic-archive svg.i { color: #5aa39b; }
.sb-item.ic-junk svg.i { color: #d4906c; }
.sb-item.ic-trash svg.i { color: #c4839b; }
.sb-item.ic-flag svg.i { color: var(--flag); }
.sb-item.ic-star svg.i { color: var(--flag); }

.row-wrap + .row-wrap { margin-top: 1px; }
.row-wrap .row.multi { background: var(--wash); }
@media (max-width: 640px) {
  .row-wrap .row:hover, .row-wrap .row.selected { background: var(--surface); }
  .row-wrap .row:active { background: var(--hover); }
  .row-wrap + .row-wrap { margin-top: 0; }
}
@media (max-width: 640px) {
  .reader-mtop { display: flex; }
}

/* ---------- Signature, templates, settings controls ---------- */
.sig-tools { display: flex; gap: 2px; }
.sig-tools .icon-btn { width: 32px; height: 30px; font-size: 14px; }
.sig-editor {
  min-height: 96px; max-height: 260px; overflow: auto; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px;
  background: var(--field); outline: none; font-size: 14px; line-height: 1.5;
}
.sig-editor:focus { border-color: var(--accent); background: var(--surface); }
.sig-editor img { max-width: 100%; height: auto; }
.sig-note { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.editor [data-sig] img { max-width: 100%; }
.tpl-btn { padding: 5px 10px; font-size: 13px; background: transparent; }
.tpl-btn:hover { background: var(--hover); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 6px; }
.tpl-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 4px 2px; border-bottom: 1px solid var(--line); }
.tpl-row span { display: flex; align-items: center; gap: 10px; font-weight: 550; }
.tpl-row span svg.i { color: #b39a63; width: 17px; height: 17px; }
.seg { display: flex; background: var(--field); border-radius: 11px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 8px; padding: 8px 10px; font-weight: 550; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.link-btn { border: 0; background: none; color: var(--accent-ink); font-weight: 600; padding: 0; cursor: pointer; }
.remote-bar .btn + .btn { margin-left: -4px; }
.msg-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { border: 0; cursor: pointer; font: inherit; font-size: 12px; color: var(--muted); }
.chip-btn:hover { color: var(--ink); background: var(--wash); }

/* ---------- Conversations ---------- */
.row-count {
  display: inline-block; margin-left: 6px; padding: 0 6px; min-width: 18px; text-align: center; border-radius: 99px;
  background: var(--wash); color: var(--accent-ink); font-size: 11.5px; font-weight: 650; line-height: 18px; vertical-align: 1px;
}
.thread-n { font-size: 12px; color: var(--muted); align-self: center; }
.msg-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.thread { display: grid; gap: 10px; padding: 0 24px 32px; }
.tmsg { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.tmsg.open { box-shadow: var(--shadow); }
.tmsg-head { display: flex; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; }
.tmsg:not(.open) .tmsg-head:hover { background: var(--hover); }
.tmsg .avatar { width: 36px; height: 36px; font-size: 13px; }
.tmsg-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tmsg-top { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.tmsg-from { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; max-width: 60%; }
.tmsg-top .addr { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tmsg-date { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; flex: none; padding-left: 8px; }
.tmsg-snippet { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmsg .remote-bar { margin: 0 16px 6px; }
.tmsg .msg-frame-wrap { padding: 4px 16px 8px; }
.tmsg .msg-frame-wrap.html { padding: 4px 10px 8px; }
.tmsg .attachments { padding: 4px 16px 8px; }
.tmsg-loading { padding: 18px; display: grid; place-items: center; }
.tmsg-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 16px 14px; }
.tmsg-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.tmsg-actions .btn svg.i { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .thread { padding: 0 10px 24px; gap: 8px; }
  .tmsg-head { padding: 11px 12px; }
  .tmsg .msg-frame-wrap.html { padding: 2px 2px 8px; }
  .tmsg-top .addr { display: none; }
}
.tmsg .msg-frame { min-height: 40px; }
@media (max-width: 640px) { .tmsg-actions .btn { flex: 1; justify-content: center; padding-left: 8px; padding-right: 8px; } }

/* ---------- Relay ---------- */
.relay-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; line-height: 1.5; }
.relay-steps a { color: var(--accent-ink); font-weight: 600; }
.sm-btn { padding: 3px 10px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.sm-btn svg.i { width: 14px; height: 14px; }
.relay-form { display: flex; gap: 8px; }
.relay-form input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--field); outline: none; }
.relay-form input:focus { border-color: var(--accent); background: var(--surface); }
.row-btns { display: flex; gap: 8px; }
.form-error.ok { color: var(--accent-ink); }
.ok-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: 8px; vertical-align: 1px; }

/* ---------- Unread filter ---------- */
.list-filter { display: flex; gap: 4px; margin-top: 8px; background: var(--field); border-radius: 10px; padding: 3px; }
.list-filter button { flex: 1; border: 0; background: transparent; border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.list-filter button.on { background: var(--surface); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(36, 48, 41, 0.12); }

/* ---------- Tooltips ---------- */
.tip {
  position: fixed; z-index: 100; pointer-events: none; max-width: 260px; padding: 5px 9px; border-radius: 8px;
  background: #243029; color: #fff; font-size: 12px; font-weight: 550; line-height: 1.35; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  opacity: 0; transform: translateY(-2px); transition: opacity 0.12s, transform 0.12s;
}
.tip.show { opacity: 1; transform: none; }

/* ---------- Compose: send menu, flags, AI ---------- */
.send-split { display: inline-flex; }
.send-split [data-c=send] { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.send-split .send-more { border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 6px; padding-right: 7px; margin-left: 1px; }
.send-split .send-more svg.i { width: 15px; height: 15px; }
.compose-flags { display: flex; gap: 6px; padding: 0 20px; }
.compose-flags:not(:empty) { padding-bottom: 8px; }
.ai-btn svg.i { color: #b07ad9; }
.ai-btn.busy { pointer-events: none; opacity: 0.6; }
.ai-btn.busy svg.i { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Date/time picker ---------- */
.when-list { display: grid; gap: 4px; }
.when { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; background: var(--field); border-radius: 10px; padding: 10px 14px; font: inherit; cursor: pointer; text-align: left; }
.when:hover { background: var(--wash); color: var(--accent-ink); }
.when .subtle { font-size: 12.5px; }

/* ---------- Category tabs & search chips ---------- */
.cat-tabs { display: flex; gap: 2px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent; font: inherit; font-size: 12.5px;
  font-weight: 600; color: var(--muted); padding: 7px 8px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.cat-tabs button svg.i { width: 14px; height: 14px; }
.cat-tabs button.on { color: var(--accent-ink); border-bottom-color: var(--primary); flex-grow: 3; }
.cat-tabs button b { background: var(--primary); color: var(--on-accent); border-radius: 99px; font-size: 10.5px; padding: 0 5px; line-height: 16px; min-width: 16px; }
.search-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.search-chips[hidden] { display: none; }
.search-chips button {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px;
  padding: 4px 10px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer;
}
.search-chips button svg.i { width: 13px; height: 13px; }
.search-chips button.on { background: var(--wash); border-color: transparent; color: var(--accent-ink); font-weight: 600; }

/* ---------- Rows: hover actions, VIP, reminders, logos ---------- */
.row { position: relative; }
.row-actions {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: none; gap: 2px; background: var(--surface);
  border-radius: 10px; box-shadow: var(--shadow); padding: 3px;
}
.row-actions button { border: 0; background: transparent; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.row-actions button:hover { background: var(--wash); color: var(--accent-ink); }
.row-actions svg.i { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .row:hover .row-actions { display: flex; } .row:hover .row-date { visibility: hidden; } }
.vip { color: #d9a74a; margin-right: 4px; display: inline-flex; vertical-align: -2px; }
.vip svg.i { width: 13px; height: 13px; }
.bumped { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-ink); font-weight: 650; }
.bumped svg.i { width: 12px; height: 12px; }
.row-avatar, .avatar { position: relative; overflow: visible; }
img.logo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; background: #fff; object-fit: contain; padding: 18%; box-shadow: inset 0 0 0 1px var(--line); }
.row.virt { cursor: pointer; }
.row.virt .row-avatar { display: grid; place-items: center; }
.row.virt .row-avatar svg.i { width: 18px; height: 18px; }
.virt-actions { display: flex; gap: 4px; align-self: center; flex-wrap: wrap; justify-content: flex-end; }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.fail { color: var(--danger); }

/* ---------- Reader extras ---------- */
.vip-chip { color: #b8862e; }
.vip-chip svg.i, .msg-chips svg.i { width: 13px; height: 13px; }
.msg-chips .chip-btn { display: inline-flex; align-items: center; gap: 5px; }
.ai-chip svg.i { color: #b07ad9; }
.ai-box { margin: 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, #b07ad9 9%, var(--surface)); font-size: 13.5px; line-height: 1.55; }
.ai-head { display: flex; align-items: center; gap: 6px; font-weight: 650; font-size: 12.5px; color: #8a55b5; margin-bottom: 4px; }
.ai-head svg.i { width: 14px; height: 14px; }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 32px 28px; }
.thread-body .ai-suggest { padding: 0 24px 28px; }
.ai-suggest .btn { display: inline-flex; align-items: center; gap: 6px; }
.ai-suggest .btn svg.i { width: 15px; height: 15px; color: #b07ad9; }
.reply-chip { max-width: 100%; white-space: normal; text-align: left; }
.att.can-preview .att-icon svg.i { width: 16px; height: 16px; }
.preview-sheet { width: min(1000px, 100%); height: min(88vh, 1100px); max-height: none; }
.preview-sheet header .btn { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.preview-wrap { flex: 1; min-height: 0; display: flex; position: relative; }
.preview-wrap > .preview-body { flex: 1; min-width: 0; }
.pv-pos { font-size: 13px; margin-right: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.preview-sheet .pv-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.12); opacity: .92; }
.pv-nav:hover { opacity: 1; }
.pv-nav svg { width: 18px; height: 18px; }
.pv-nav.prev { left: 22px; }
.pv-nav.next { right: 22px; }
.pv-nav.next svg { transform: scaleX(-1); }
.preview-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 16px 16px; }
.preview-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.preview-body iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: #fff; }
.preview-body.pdf { display: block; overflow: auto; background: #e9ece8; border-radius: 10px; margin: 0 16px 16px; padding: 16px; }
.pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pdf-pages canvas { background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.15); border-radius: 2px; max-width: 100%; }
.pdf-count { position: sticky; top: 0; z-index: 1; width: max-content; margin: 0 auto 10px; font-size: 12px; color: #fff; background: rgba(0,0,0,.55); padding: 3px 10px; border-radius: 10px; }
@media (prefers-color-scheme: dark) { .preview-body.pdf { background: #2a2f2b; } }

/* ---------- Menus ---------- */
.menu-item.on { color: var(--accent-ink); font-weight: 650; }
.menu-item.on svg.i { color: var(--accent-ink); }
.menu-item.danger, .menu-item.danger svg.i { color: var(--danger); }
.menu-check { cursor: pointer; font-size: 12.5px; }
.menu-check input { margin: 0 2px 0 0; }
.sb-title.static { cursor: default; padding-left: 12px; }

/* ---------- Settings, rules ---------- */
.set-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.set-line > span { flex: 1 1 200px; }
.seg.small button { padding: 5px 10px; font-size: 12.5px; flex: 0 0 auto; }
.rule-list { display: grid; gap: 6px; }
.rule-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--field); }
.rule-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13px; }
.rule-text span { color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 99px; cursor: pointer; transition: background 0.15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(14px); }
.rule-form .conds { display: grid; gap: 6px; }
.cond-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 6px; align-items: center; }
.cond-row select, .cond-row input, .inline-sel, .with-sel select, .rule-form select {
  padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--field); font: inherit; min-width: 0;
}
.rule-acts { display: grid; gap: 8px; font-size: 13.5px; }
.rule-acts label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
@media (max-width: 640px) {
  .cond-row { grid-template-columns: 1fr 1fr; }
  .cond-row input { grid-column: 1 / -1; }
  .ai-suggest { padding: 0 16px 24px; }
  .preview-sheet { height: 92vh; }
}
.row-avatar .acct-mark { z-index: 1; }
@media (max-width: 640px) {
  .fmt .tpl-btn span { display: none; }
  .fmt { gap: 0; }
}

/* ---------- Compose: richer toolbar ---------- */
.fmt { align-items: center; gap: 6px; padding: 6px 12px 6px; border-top: 1px solid var(--line); flex: none; } /* at the bottom, above «Αποστολή» */
.fmt-tools { flex: 1; min-width: 0; display: flex; align-items: center; gap: 1px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.fmt-tools .icon-btn { width: 30px; height: 30px; flex: none; }
.fmt-tools .icon-btn svg.i { width: 17px; height: 17px; }
.fmt-sep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 5px; flex: none; }
.fmt-drop { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 4px 7px; font-size: 12.5px; background: transparent; }
.fmt-drop:hover { background: var(--hover); }
.fmt-drop svg.i { width: 15px; height: 15px; }
.fmt-drop svg.i + svg.i { width: 12px; height: 12px; color: var(--muted); }
.fmt-drop span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmt > .tpl-btn { flex: none; }
.swatches { display: grid; grid-template-columns: repeat(5, 28px); gap: 6px; padding: 6px 6px 4px; }
.menu-item.swatch { width: 28px; height: 28px; padding: 0; border-radius: 50%; background: var(--sw); border: 1px solid var(--line-strong); justify-content: center; }
.menu-item.swatch:hover { background: var(--sw); transform: scale(1.12); }
.menu-item.swatch svg.i { width: 14px; height: 14px; }
.editor hr { border: 0; border-top: 1px solid var(--line-strong); margin: 12px 0; }
.editor ol, .editor ul { padding-left: 24px; }

/* ---------- Compose: big window & pop-out ---------- */
.compose-backdrop { position: fixed; inset: 0; z-index: 44; background: rgba(20, 30, 24, 0.28); }
/* the big window: almost the whole screen; the writing area fills the middle, attachments and the
   bottom bar sit at the bottom (so nothing bunches up at the top) */
.compose.expanded { right: 50%; bottom: 50%; transform: translate(50%, 50%); width: min(1180px, calc(100vw - 48px)); height: calc(100vh - 40px); max-height: none; }
.compose.expanded .editor { flex: 1 1 auto; min-height: 0; overflow: auto; font-size: 15px; padding: 18px 24px; }
.compose.expanded .compose-atts { flex: none; max-height: 30vh; overflow: auto; }
.compose.popout, .popout-mode .compose { inset: 0; width: 100%; height: 100%; border-radius: 0; box-shadow: none; transform: none; }
.popout-mode #app, .popout-mode #login { display: none !important; }
.popout-mode { background: var(--surface); }

/* ---------- Settings ---------- */
.settings-sheet { width: min(900px, 100%); height: min(720px, 92vh); max-height: none; overflow: hidden; }
.set-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.set-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 16px 14px; border-right: 1px solid var(--line); }
.set-nav button {
  display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 9px 12px; border-radius: 10px; font: inherit;
  font-size: 13.5px; font-weight: 550; color: var(--ink); cursor: pointer; text-align: left;
}
.set-nav button svg.i { width: 17px; height: 17px; color: var(--muted); flex: none; }
.set-nav button:hover { background: var(--hover); }
.set-nav button.on { background: var(--wash); color: var(--accent-ink); }
.set-nav button.on svg.i { color: var(--accent-ink); }
.set-content { overflow-y: auto; padding: 8px 24px 24px; }
.set-pane { display: grid; gap: 14px; }
.set-pane[hidden] { display: none; }
.set-card { border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; background: var(--surface); }
.set-card-title { font-size: 12px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); padding: 12px 0 4px; }
.set-card > p.set-p, .set-card > div > p.set-p { padding: 6px 0 12px; font-size: 13px; }
.set-card-foot { padding: 12px 0; }
.set-card-foot .btn { display: inline-flex; align-items: center; gap: 6px; }
.set-card .acct-row:last-of-type { border-bottom: 0; }
.set-card .tpl-row { padding: 8px 0 8px 2px; }
.set-card .tpl-row:last-child { border-bottom: 0; }
.set-card .relay-form { padding: 10px 0 12px; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-card-title + .set-row, .set-card > .set-row:first-child { border-top: 0; }
.set-row-text { flex: 1; min-width: 0; }
.set-row-title { font-weight: 600; font-size: 13.5px; }
.set-row-desc { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }
.set-row-ctl { flex: none; }
.set-row-ctl .btn { display: inline-flex; align-items: center; gap: 6px; }
.set-note { margin: 0 4px; color: var(--muted); font-size: 12.5px; }
.set-card #notif-block, .set-card #relay-block { padding: 8px 0 12px; display: grid; gap: 10px; }
@media (max-width: 640px) {
  .settings-sheet { height: 94vh; }
  .set-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .set-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 4px 12px 8px; scrollbar-width: none; }
  .set-nav button { flex: none; padding: 7px 10px; font-size: 13px; white-space: nowrap; }
  .set-content { padding: 12px 14px 24px; }
  .set-row { flex-wrap: wrap; gap: 8px; }
  .set-row-ctl { width: 100%; }
  .compose.expanded { inset: 0; width: 100%; height: 100%; transform: none; border-radius: 0; }
}

/* ---------- Multi-user ---------- */
.overlay.stacked { z-index: 49; background: rgba(20, 30, 24, 0.22); }
.overlay.stacked .sheet { max-width: 480px; }
.sb-me { flex: 1; min-width: 0; text-align: right; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.badge-shared { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); background: var(--field); border-radius: 6px; padding: 1px 6px; vertical-align: 1px; }
.badge-shared svg { width: 12px; height: 12px; }
.acct-row .btn svg { width: 15px; height: 15px; }
.user-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-row .info { flex: 1; min-width: 0; }
.user-row .info > div:first-child { font-weight: 600; }
.user-row .info > div:nth-child(2) { color: var(--muted); font-size: 12.5px; }
.user-row .avatar.sm { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft, #e3eee7); color: var(--accent); font-weight: 600; flex: none; }
.user-accts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip-sm { font-size: 11.5px; background: var(--field); border-radius: 6px; padding: 2px 7px; }
.subtle { color: var(--muted); font-weight: 400; }
.share-row { padding: 6px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pw-show { font: 600 18px/1.4 ui-monospace, Menlo, monospace; background: var(--field); border-radius: 10px; padding: 10px 14px; margin: 10px 0; text-align: center; letter-spacing: .5px; user-select: all; }
.menu-item.danger { color: var(--danger); }
.acct-limited > .field:not(.sig-field), .acct-limited > details, .acct-limited [data-google] { display: none !important; }
.acct-limited > .hint ~ .hint { display: none !important; }
.grid-half { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .grid-half { grid-template-columns: 1fr; } }
#users-block label.check, .acct-limited label.check { display: flex; align-items: center; justify-content: flex-start; gap: 8px; text-align: left; font-weight: 400; }
#users-block .field > label.check { margin: 4px 0; }
#users-block .check input, .share-row input { width: auto; flex: none; padding: 0; }

/* ---------- Assignments ---------- */
.asg-chip { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; flex: none; font-size: 11px; font-weight: 600; color: #6b5a2e; background: #f6ecd2; border-radius: 6px; padding: 1px 6px 1px 4px; }
.asg-chip svg { width: 12px; height: 12px; }
.asg-chip.me { color: #fff; background: var(--primary); }
.row-subject .asg-chip { white-space: nowrap; }
.asg-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 10px 0 4px; padding: 9px 12px; border-radius: 12px; background: #f8f0dc; color: #4f4322; font-size: 13.5px; }
.asg-banner > svg { width: 17px; height: 17px; flex: none; }
.asg-banner > span:first-of-type { flex: 1; min-width: 180px; }
.asg-banner.me { background: var(--wash); color: var(--ink); }
.asg-banner.done { background: var(--field); color: var(--muted); }
.asg-btns { display: flex; gap: 6px; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.sm svg { width: 14px; height: 14px; }
.asg-people { display: grid; gap: 4px; margin: 6px 0 14px; }
.asg-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.asg-person:hover { background: var(--field); }
.asg-person input { accent-color: var(--accent); }
.asg-person .avatar.sm { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--wash); color: var(--accent); font-weight: 600; flex: none; }
.asg-person:has(input:checked) { background: var(--wash); }
.sb-me { display: flex; align-items: center; justify-content: flex-end; align-self: stretch; line-height: 1; }

/* ---------- Sidebar: each folder once ---------- */
#sidebar .sb-section + .sb-section { margin-top: 12px; }
.sb-acct .chev { width: 12px !important; height: 12px !important; transition: transform .15s; transform: rotate(-90deg); flex: none; }
.sb-acct.open .chev { transform: none; }
.sb-acct .acct-mark { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.sb-acct .sb-count { background: transparent; color: var(--faint); font-weight: 500; }
.sb-item.sub { font-size: 13.5px; }
.sb-item.child.has-error .badge { background: transparent; color: var(--danger); font-weight: 700; }
.acct-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.acct-chips::-webkit-scrollbar { display: none; }
.acct-chips button { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; }
.acct-chips button.on { background: var(--wash); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.acct-chips .acct-mark { width: 8px; height: 8px; border-radius: 3px; }
.list-note { display: flex; align-items: center; gap: 7px; margin: 0 6px 8px; padding: 8px 12px; color: var(--muted); font-size: 12px; background: var(--field); border-radius: 10px; }
.list-note svg { width: 14px; height: 14px; flex: none; }

/* ---------- Sidebar: full or icons only (computer) ---------- */
.brand .sb-hide { margin-left: auto; color: var(--muted); }
@media (min-width: 881px) {
  .app.sb-off { grid-template-columns: 64px 380px 1fr; }
  .app.sb-off .sidebar { padding: 10px 6px 150px; gap: 12px; overflow-x: hidden; }
  .app.sb-off .sidebar .label, .app.sb-off .sb-title, .app.sb-off .brand > span, .app.sb-off .brand > img,
  .app.sb-off .sb-me, .app.sb-off .sb-acct, .app.sb-off .sb-item.sub, .app.sb-off .sb-own { display: none !important; }
  .app.sb-off .brand { justify-content: center; padding: 4px 0 2px; }
  .app.sb-off .brand .sb-hide { margin: 0; }
  .app.sb-off .sb-top .btn.wide { width: 44px; height: 44px; padding: 0; justify-content: center; margin: 0 auto; border-radius: 14px; }
  .app.sb-off .sb-item { justify-content: center; padding: 0; width: 44px; height: 40px; margin: 0 auto; position: relative; gap: 0; }
  .app.sb-off .sb-item.child { padding: 0; }
  .app.sb-off .sb-item.child .acct-mark { width: 12px; height: 12px; border-radius: 4px; }
  .app.sb-off .sb-item .badge { position: absolute; top: 1px; right: -2px; min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 15px; }
  .app.sb-off .sb-item.child.has-error .badge { background: var(--surface); }
  .app.sb-off #sidebar .sb-section + .sb-section { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
  .app.sb-off .sb-footer { width: 52px; left: 6px; flex-direction: column; align-items: center; gap: 2px; }
  .app.sb-off .list-header [data-act="show-sidebar"] { display: none !important; }
}
@media (min-width: 881px) and (max-width: 1150px) { .app.sb-off { grid-template-columns: 64px 330px 1fr; } }
@media (max-width: 880px) { .brand .sb-hide { display: none; } }

/* ---------- Reactions ---------- */
.react-menu { display: flex; gap: 2px; padding: 2px; }
.menu .react-pick { font-size: 22px; padding: 6px 7px; border-radius: 10px; border: 0; background: none; cursor: pointer; line-height: 1; justify-content: center; min-width: 0; }
.menu .react-pick:hover { background: var(--hover); transform: scale(1.15); }
.tmsg.reaction-line { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--muted); font-size: 13px; }
.tmsg.reaction-line .react-emoji { font-size: 22px; line-height: 1; }
.tmsg.reaction-line .tmsg-date { margin-left: auto; }
.react-btn { padding-left: 10px; padding-right: 10px; }

/* ---------- Opening: header first, body when it arrives ---------- */
.msg-snippet-preview { color: var(--muted); margin: 18px 2px 0; line-height: 1.55; }
.msg-loading { display: grid; place-items: center; padding: 30px 0; }

/* ---------- Selecting many ---------- */
.row-avatar { position: relative; }
.row-check { position: absolute; inset: 0; z-index: 2; border-radius: 50%; display: none; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); color: transparent; cursor: pointer; }
.row-check svg { width: 16px; height: 16px; }
.row-avatar:hover .row-check, .app.selecting .row-check { display: grid; }
.row.multi .row-check, .row-check.on { display: grid; background: var(--primary); border-color: var(--primary); color: #fff; }
.row.multi { background: var(--wash); }
.bulk-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 0 4px 8px; padding: 6px 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); }
.bulk-bar .spacer { flex: 1; }
.bulk-count { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; font-weight: 650; cursor: pointer; padding: 4px 6px; color: var(--ink); }
.bulk-count .row-check { position: static; display: grid; width: 22px; height: 22px; }
.bulk-bar .icon-btn { width: 32px; height: 32px; }
/* ---------- Pages ---------- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 10px 8px 18px; color: var(--muted); font-size: 12.5px; }
.pager .pager-range { margin-right: 6px; }
.pager .pager-next svg { transform: scaleX(-1); }
.pager select { margin-left: 8px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 4px 6px; font: inherit; color: var(--ink); }
.pager .spinner { width: 14px; height: 14px; }
.bulk-bar { flex-direction: column; align-items: stretch; gap: 2px; }
.bulk-top, .bulk-actions { display: flex; align-items: center; gap: 4px; }
.bulk-actions { justify-content: space-between; border-top: 1px solid var(--line); padding-top: 4px; }
.bulk-link { border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: 12.5px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.bulk-link:hover { background: var(--hover); }
.app.selecting .row-actions { display: none !important; }

/* ---------- Team: status, tags, notes, presence, numbers ---------- */
.team-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.st-seg button.on.st-open { background: #e3f1e8; color: #2f6f4a; }
.st-seg button.on.st-pending { background: #fbefd9; color: #8a5a12; }
.st-seg button.on.st-closed { background: var(--field); color: var(--muted); }
.team-tags { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; color: color-mix(in srgb, var(--c) 70%, #000); background: color-mix(in srgb, var(--c) 16%, #fff); margin-left: 6px; white-space: nowrap; }
.team-tags .tag-chip { margin: 0; font-size: 12px; padding: 2px 6px 2px 9px; }
.tag-chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; opacity: .6; }
.tag-chip button:hover { opacity: 1; }
.tag-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.sb-item .tag-dot { margin: 0 3px; }
.st-chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 6px; margin-left: 6px; white-space: nowrap; }
.st-chip svg { width: 12px; height: 12px; }
.st-open { background: #fbefd9; color: #8a5a12; }
.st-pending { background: #fbefd9; color: #8a5a12; }
.st-closed { background: var(--field); color: var(--muted); }
.notes-box:not(:empty) { margin: 22px 0 10px; padding: 14px; background: #fbf7ea; border: 1px solid #efe4c3; border-radius: 14px; }
.notes-title { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 13px; margin-bottom: 8px; }
.notes-title svg { width: 16px; height: 16px; color: #a68a3a; }
.note { padding: 8px 0; border-top: 1px solid #efe4c3; }
.note-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.note-head b { color: var(--ink); }
.note-head .icon-btn { margin-left: auto; width: 24px; height: 24px; }
.note-text { white-space: pre-wrap; margin-top: 3px; line-height: 1.5; }
.note-text .mention { color: #8a5a12; }
.note-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.note-form textarea { flex: 1; resize: vertical; min-height: 40px; border: 1px solid #e6d9b2; border-radius: 10px; padding: 8px 10px; font: inherit; background: #fff; }
.presence:empty { display: none; }
.presence { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; padding: 7px 12px; border-radius: 10px; font-size: 13px; background: var(--field); color: var(--muted); }
.presence svg { width: 15px; height: 15px; }
.presence.replying { background: #fdecea; color: #a03b30; }
.compose-presence { display: flex; align-items: center; gap: 7px; padding: 7px 14px; font-size: 12.5px; background: #fdecea; color: #a03b30; }
.compose-presence svg { width: 14px; height: 14px; }
.stats-sheet { max-width: 920px !important; width: 100%; }
.stats-sheet header { gap: 12px; }
.stats-sheet header h3 { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.stats-body { display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { background: var(--field); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.kpi b { font-size: 22px; letter-spacing: -.02em; }
.kpi span { font-size: 12px; color: var(--muted); }
.stat-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat-title { font-weight: 650; font-size: 13px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.legend { font-weight: 400; font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.lg-in, .bar.in { background: var(--accent); }
.lg-out, .bar.out { background: #d9a14e; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.bar-col { flex: 1; display: flex; align-items: flex-end; gap: 1px; height: 100%; min-width: 3px; }
.bar { flex: 1; border-radius: 3px 3px 0 0; min-height: 1px; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stat-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 4px 6px; }
.stat-table td { padding: 6px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.stat-row > span:first-child { flex: 1; }
.stat-row .tag-chip, .stat-row .st-chip { margin: 0; }
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr 1fr; } .stat-grid { grid-template-columns: 1fr; } .stat-table { font-size: 12px; } }
.row-snippet .st-chip, .row-snippet .tag-chip { margin: 0 5px 0 0; vertical-align: 1px; }

/* ---------- Aliases ---------- */
.alias-chip { display: inline-flex; align-items: center; margin-left: 6px; font-size: 11px; font-weight: 650; color: #4b5f9e; background: #e7ecfa; border-radius: 6px; padding: 1px 6px; white-space: nowrap; flex: none; }
.me-mark { width: 18px; height: 18px; border-radius: 50%; background: #4b5f9e; color: #fff; font: 700 10px/18px system-ui, sans-serif; text-align: center; flex: none; }
.app.sb-off .sb-item.ic-mine .me-mark { width: 22px; height: 22px; line-height: 22px; }
.alias-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.alias-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 6px 4px; }
.alias-table td { padding: 6px 4px; border-top: 1px solid var(--line); }
.alias-table select, .alias-table input { width: 100%; min-width: 90px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 6px; background: var(--surface); font: inherit; font-size: 12.5px; }
@media (max-width: 700px) { .alias-table th:nth-child(5), .alias-table td:nth-child(5) { display: none; } }
.empty-jump { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.empty-jump .btn { display: inline-flex; align-items: center; gap: 6px; }
.empty-jump .btn svg { width: 15px; height: 15px; }
/* voice messages */
.voice { flex: 1 1 100%; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); max-width: 560px; }
.voice-play { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.voice-play svg { width: 18px; height: 18px; fill: currentColor; stroke: none; margin-left: 2px; }
.voice-play .spinner { border-color: rgba(255,255,255,.4); border-top-color: #fff; }
.voice-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.voice-info b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.voice-info b svg { width: 18px; height: 18px; }
.voice-info span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice audio { flex: 1 1 260px; min-width: 0; height: 40px; }
.voice-speed { display: flex; gap: 4px; }
.voice-speed button { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.voice-speed button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.voice-err { flex-basis: 100%; font-size: 12.5px; color: var(--danger, #b4443a); }
/* printing: only the active .print-root goes to paper */
.print-root { display: none; }
@media print {
  html.printing body > *:not(.print-root.active) { display: none !important; }
  html.printing, html.printing body { background: #fff !important; height: auto !important; overflow: visible !important; }
  html.printing .print-root.active { display: block; color: #111; }
  /* one PDF page per sheet. Safari: a page break AFTER something that nearly fills the sheet gives an
     extra blank sheet, so breaks go BEFORE each page (not the first), and each picture stays clearly
     shorter than the sheet (A4 or Letter, with Safari's header/footer and margins). */
  html.printing body { display: block !important; margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
  .print-root.pr-pages .pp-page { display: block; break-before: page; page-break-before: always; break-after: auto; page-break-after: auto; break-inside: avoid; page-break-inside: avoid; margin: 0; padding: 0; }
  .print-root.pr-pages .pp-page:first-child { break-before: auto; page-break-before: auto; }
  .print-root.pr-pages img { display: block; margin: 0 auto; width: auto; height: auto; max-width: 100%; max-height: 232mm; }
  .print-root.pr-doc { font: 13px/1.5 -apple-system, Helvetica, Arial, sans-serif; }
  .print-root.pr-doc h1 { font-size: 19px; margin: 0 0 14px; }
  .print-root.pr-doc .pm { border-top: 1px solid #ccc; padding: 12px 0; }
  .print-root.pr-doc .ph { color: #333; margin-bottom: 10px; }
  .print-root.pr-doc .pa { color: #555; margin-top: 8px; }
  .print-root.pr-doc pre { white-space: pre-wrap; font: inherit; }
  .print-root.pr-doc img { max-width: 100%; }
  @page { margin: 8mm; }
}
.overlay.ask .sheet { max-width: 440px; width: calc(100% - 32px); }
.ask-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.btn.primary.danger { background: #b4443a; border-color: #b4443a; }

/* compose: send, attach and signature at the bottom too, where your writing ends */
.compose-foot { display: flex; align-items: center; gap: 6px; padding: 6px 12px 8px 16px; border-top: 1px solid var(--line); flex: none; min-height: 44px; }
.compose-foot .btn.primary { display: inline-flex; align-items: center; gap: 6px; }
.compose-foot .foot-space { flex: 1; }
.compose-foot .foot-sig .link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 8px; font-family: inherit; }
.compose-foot .foot-sig .link:hover { color: var(--primary); background: var(--field); }
.compose-foot .foot-sig svg { width: 15px; height: 15px; }
.compose-atts:empty { display: none; }
@media (max-width: 700px) { .compose-foot .foot-sig .link { font-size: 12px; } }
/* several signatures per mailbox */
.sig-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sig-tab { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: inherit; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.sig-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.sig-tab small { font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.08); }
.sig-tab.on small { background: rgba(255,255,255,.22); }
.sig-tab.add { border-style: dashed; color: var(--muted); }
.sig-tab.add svg { width: 14px; height: 14px; }
.sig-panel { display: flex; flex-direction: column; gap: 6px; }
.sig-namebar { display: flex; gap: 6px; align-items: center; }
.sig-namebar .sig-name { flex: 1; min-width: 0; }
.sig-defaults { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.sig-defaults label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; }
.sig-defaults select { font: inherit; color: var(--text); }
/* who is in Posta */
.user-presence { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.user-presence.on { color: #3d8b5a; font-weight: 600; }
.on-dot, .off-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
.on-dot { background: #3fae67; }
.off-dot { background: var(--line-strong); }
.sb-online { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); cursor: default; padding: 0 2px; letter-spacing: 0; text-transform: none; }
.sb-team-sec .sb-title { display: flex; align-items: center; }
.app.sb-off .sb-online { display: none; }
/* counts that aren't "unread" (drafts, flagged): quieter */
.sb-item.count-soft .badge { background: transparent; color: var(--muted); font-weight: 500; }
.sb-item.count-soft.selected .badge { color: inherit; }
.invite-link { display: flex; gap: 8px; margin-top: 6px; }
.invite-link input { flex: 1; min-width: 0; font-size: 12.5px; }
.overlay.ask .inv-from { margin-left: 6px; }
.from-warn { display: flex; gap: 8px; align-items: flex-start; padding: 8px 14px; font-size: 12.5px; line-height: 1.45; color: #8a5a12; background: #fdf3df; border-top: 1px solid var(--line); }
.from-warn svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
@media (prefers-color-scheme: dark) { .from-warn { color: #f1c97a; background: #3a3020; } }
/* status: "Εκκρεμεί" / "Ολοκληρώθηκε" */
.team-bar .st-chip.big { font-size: 12.5px; padding: 4px 10px; gap: 5px; margin: 0; border-radius: 8px; }
.team-bar .st-chip.big svg { width: 14px; height: 14px; }
.team-bar .btn.sm svg { width: 14px; height: 14px; }
.team-bar .icon-btn.sm { width: 28px; height: 28px; }
.team-bar .icon-btn.sm svg { width: 14px; height: 14px; }
/* compose: the message being answered, at the bottom */
.compose-orig { flex: none; border-top: 1px solid var(--line); background: var(--field); }
.compose-orig .co-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 16px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.compose-orig .co-head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-orig .co-head b { color: var(--text); font-weight: 600; }
.compose-orig .co-head svg { width: 15px; height: 15px; flex: none; }
.compose-orig .co-head svg:last-child { transition: transform .15s; }
.compose-orig .co-body { display: none; white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; color: var(--text); padding: 0 24px 14px 39px; max-height: 30vh; overflow: auto; }
.compose-orig.open .co-body { display: block; }
.compose-orig.open .co-head svg:last-child { transform: rotate(180deg); }
/* in the big window it is open from the start and takes the lower part */
.compose.expanded .compose-orig:not(.closed) .co-body { display: block; max-height: 34vh; }
.compose.expanded .compose-orig:not(.closed) .co-head svg:last-child { transform: rotate(180deg); }

/* phases of a conversation (Θέλει απάντηση / Περιμένουμε / Υπενθύμιση) */
.ph-needs { background: #fbefd9; color: #8a5a12; }
.ph-waiting { background: #eceeec; color: #5d6660; }
.ph-remind { background: #f8e0dc; color: #a33a2c; }
.phase-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 11px; border-radius: 8px; flex-wrap: wrap; }
.phase-line svg { width: 14px; height: 14px; flex: none; }
.phase-line .subtle { font-weight: 400; }
.sb-item.count-warn .badge { background: #c4523f; color: #fff; }

/* reactions: which message they are about, and shown on that message */
.reaction-line .react-text { flex: 1; min-width: 0; }
.react-about { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-align: left; }
.react-about:hover { color: var(--primary); text-decoration: underline; }
.react-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.react-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 1; padding: 4px 8px 4px 6px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); }
.react-chip span { font-size: 11.5px; color: var(--muted); }
.tmsg.flash { box-shadow: 0 0 0 2px var(--primary); transition: box-shadow .3s; }
.fmt + .compose-foot { border-top: 0; padding-top: 2px; }

/* «Παρακολούθηση»: one mailbox at a time */
.phase-accts { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 14px 10px; }
.pa-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel, #fff); color: var(--text); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; }
.pa-chip b { font-weight: 600; color: var(--muted); }
.pa-chip:hover { background: var(--hover); }
.pa-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pa-chip.on b { color: rgba(255,255,255,.85); }

/* inbox: what needs a look (late conversations) and «Καθάρισμα» */
.inbox-tips { display: flex; gap: 6px; flex-wrap: wrap; padding: 2px 14px 10px; }
.inbox-tips .itip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--field); color: var(--text); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.inbox-tips .itip svg { width: 14px; height: 14px; }
.inbox-tips .itip:hover { background: var(--hover); }
.inbox-tips .itip.warn { background: #f8e0dc; border-color: #f0c9c2; color: #a33a2c; }
.cleanup-sheet .sheet { width: min(720px, calc(100vw - 32px)); }
.cleanup .cl-group { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; overflow: hidden; }
.cleanup .cl-group summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.cleanup .cl-group summary::-webkit-details-marker { display: none; }
.cleanup .cl-title { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.cleanup .cl-title .subtle { font-size: 12px; }
.cleanup .cl-n { font-size: 12px; color: var(--muted); }
.cleanup .cl-items { border-top: 1px solid var(--line); max-height: 260px; overflow: auto; }
.cleanup .cl-item { display: grid; grid-template-columns: auto auto minmax(90px, 180px) 1fr auto; align-items: center; gap: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.cleanup .cl-item:hover { background: var(--hover); }
.cleanup .cl-from { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cleanup .cl-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.cleanup .cl-date { font-size: 12px; color: var(--muted); }
.compose-foot .send-arch { margin-right: 4px; }
@media (max-width: 700px) {
  .cleanup .cl-item { grid-template-columns: auto auto 1fr auto; }
  .cleanup .cl-subj { display: none; }
  .compose-foot .send-arch span { display: none; }
}
.cleanup-sheet header h3 { display: flex; align-items: center; gap: 8px; } .cleanup-sheet header h3 svg { width: 18px; height: 18px; }

/* files under a row */
.row-atts { display: flex; gap: 6px; margin-top: 6px; min-width: 0; overflow: hidden; }
.ratt { display: inline-flex; align-items: center; gap: 5px; min-width: 0; flex: 0 1 auto; max-width: 75%; padding: 2px 8px 2px 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 12px; color: var(--ink); line-height: 18px; }
.ratt > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ratt b { flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: .02em; padding: 0 4px; border-radius: 4px; background: var(--wash); color: var(--accent-ink); line-height: 15px; }
.ratt.pdf b { background: #f6e1df; color: #b4473f; }
.ratt.img b { background: #e2ecf6; color: #3f6c99; }
.ratt.xls b { background: #e0f0e4; color: #2f7a47; }
.ratt.doc b { background: #e1e8f7; color: #3a5ea8; }
.ratt.more { padding: 2px 8px; color: var(--muted); flex: none; }

/* Παραλαβή απευθείας στο Posta */
.pm-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.pm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.pm-acct { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-acct .subtle { font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.pm-steps { margin-top: 12px; }
.pm-steps summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.pm-steps code { font-size: 12px; background: var(--wash); padding: 1px 4px; border-radius: 4px; word-break: break-all; }

.preview-body .pv-video { max-width: 100%; max-height: 100%; width: auto; height: auto; margin: auto; display: block; background: #000; border-radius: 8px; }
.preview-body:has(.pv-wait) { position: relative; }
.preview-body .pv-wait { position: absolute; left: 50%; top: 50%; margin: -12px 0 0 -12px; z-index: 1; }
/* the version, next to the name at the top left */
.brand .app-ver { font-style: normal; font-size: 11px; font-weight: 600; line-height: 1; color: var(--muted); background: var(--field);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 7px; margin-left: -2px; font-variant-numeric: tabular-nums; }
.app.sb-off .brand > .app-ver { display: none; }
/* @-mentions in notes: the colleagues, in a list under the box */
.note-form { position: relative; }
.mention-menu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; min-width: 260px; max-width: 360px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px; }
.mention-menu.up { top: auto; bottom: calc(100% + 4px); }
.mention-item { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; cursor: pointer; }
.mention-item.on, .mention-item:hover { background: var(--field); }
.mention-item span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.mention-item small { color: var(--muted); font-size: 12px; }
.mention-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: #f3e9cf; color: #7a6326; flex: none; }
