:root {
  --bg: #f6f8fc; --surface: #fff; --surface-2: #f2f6fc; --hover: #eaf1fb; --text: #1f1f1f; --muted: #5f6368; --line: #e0e3e7;
  --accent: #0b57d0; --accent-bg: #d3e3fd; --compose-bg: #c2e7ff; --compose-fg: #001d35; --unread-bg: #fff; --read-bg: #f2f6fc;
  --star: #f4b400; --danger: #d93025; --shadow: 0 1px 2px rgba(60,64,67,.3), 0 2px 6px 2px rgba(60,64,67,.15);
  --font: "Google Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1f; --surface: #252529; --surface-2: #2c2c31; --hover: #34343a; --text: #e3e3e3; --muted: #a8abb0; --line: #3c3c42;
    --accent: #a8c7fa; --accent-bg: #0842a0; --compose-bg: #004a77; --compose-fg: #c2e7ff; --unread-bg: #252529; --read-bg: #1f1f23;
    --shadow: 0 1px 3px rgba(0,0,0,.6), 0 4px 10px 2px rgba(0,0,0,.35);
  }
  .msg-frame { background: #fff; border-radius: 4px; }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.4 var(--font); color: var(--text); background: var(--bg); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
.grow { flex: 1; }
.b { font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pad { padding: 12px 24px; }
.ico { display: inline-flex; vertical-align: middle; }
.link { background: none; border: 0; color: var(--accent); padding: 0 4px; cursor: pointer; }
.link:hover { text-decoration: underline; }
#app { height: 100%; display: flex; flex-direction: column; }
.splash { margin: auto; color: var(--accent); }
.loading, .empty { text-align: center; color: var(--muted); padding: 64px 16px; }
.empty .ico { opacity: .3; display: block; margin: 0 auto 12px; }

/* buttons */
.btn { border: 1px solid transparent; border-radius: 20px; padding: 8px 18px; background: var(--surface-2); font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.btn.primary { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #062e6f; } }
.btn.outline { background: transparent; border-color: var(--line); color: var(--accent); }
.btn.outline:hover { background: var(--hover); }
.btn.small { padding: 4px 14px; }
.btn.wide { width: 100%; justify-content: center; padding: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { background: none; border: 0; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.small { width: 28px; height: 28px; }
.icon-btn.tiny { width: 20px; height: 20px; }
.icon-btn.disabled { opacity: .35; pointer-events: none; }
.icon-btn.light { color: inherit; }
.icon-btn.light:hover { background: rgba(255,255,255,.15); }
.sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; flex: none; }
.chip { display: inline-block; background: var(--accent-bg); color: var(--text); border-radius: 4px; padding: 0 6px; font-size: 12px; margin-right: 6px; line-height: 18px; }
.chip.big { padding: 2px 8px; font-size: 12px; }
.chip-x { background: none; border: 0; margin-left: 4px; padding: 0; }
.field { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); outline: none; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
textarea.field { resize: vertical; }
.avatar { border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 500; flex: none; }

/* login */
.login-wrap { margin: auto; padding: 16px; width: 100%; max-width: 420px; }
.login { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 40px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { font-size: 24px; font-weight: 400; margin: 0; }
.login p { margin: 0 0 8px; }
.login-error { color: var(--danger); min-height: 18px; font-size: 13px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 22px; text-decoration: none; }
.logo .ico { color: var(--danger); }
.logo.big { color: var(--text); justify-content: center; font-size: 28px; }

/* top bar */
.topbar { height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 16px 0 8px; flex: none; }
.topbar .logo { width: 180px; margin-left: 4px; }
.search { flex: 0 1 720px; display: flex; align-items: center; background: var(--surface-2); border-radius: 24px; height: 48px; padding: 0 4px; }
.search:focus-within { background: var(--surface); box-shadow: var(--shadow); }
.search-input { flex: 1; border: 0; background: none; outline: none; height: 100%; font-size: 16px; min-width: 0; }
.search .clear { visibility: hidden; }
.searching .search .clear { visibility: visible; }
.avatar-btn { background: none; border: 0; padding: 4px; border-radius: 50%; }

/* shell */
.shell { flex: 1; display: flex; min-height: 0; padding-right: 16px; }
.rail { width: 68px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 8px; flex: none; }
.rail-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
.rail-item .ico { width: 56px; height: 32px; justify-content: center; align-items: center; border-radius: 16px; }
.rail-item:hover .ico { background: var(--hover); }
.rail-item.active { color: var(--text); font-weight: 600; }
.rail-item.active .ico { background: var(--accent-bg); }
.sidebar { width: 256px; flex: none; overflow-y: auto; padding: 8px 8px 16px 0; transition: margin .15s; }
.nav-collapsed .sidebar { margin-left: -256px; }
.main { flex: 1; min-width: 0; background: var(--surface); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 8px; }
.compose-btn { display: flex; align-items: center; gap: 12px; background: var(--compose-bg); color: var(--compose-fg); border: 0; border-radius: 16px; height: 56px; padding: 0 24px 0 16px; font-weight: 500; font-size: 14px; margin: 8px 0 16px 8px; box-shadow: 0 1px 2px rgba(60,64,67,.2); }
.compose-btn:hover { box-shadow: var(--shadow); }
.nav-item { display: flex; align-items: center; gap: 18px; height: 32px; padding: 0 12px 0 26px; border-radius: 0 16px 16px 0; color: var(--text); margin-right: 0; }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--accent-bg); font-weight: 700; }
.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { font-size: 12px; color: var(--muted); }
.nav-count.b { font-weight: 700; color: var(--text); }
.side-section { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 4px 26px; font-weight: 500; font-size: 14px; }

/* toolbar */
.list-toolbar { display: flex; align-items: center; gap: 2px; padding: 4px 12px 4px 8px; min-height: 48px; border-bottom: 1px solid transparent; flex: none; }
.sel-all { display: inline-flex; align-items: center; gap: 0; padding: 0 8px; color: var(--muted); }
.pager { display: flex; align-items: center; color: var(--muted); font-size: 12px; }
.pager-text { padding: 0 8px; }
.list-toolbar .link { margin-left: 8px; }

/* list */
.mail-list { flex: 1; overflow-y: auto; }
.row { display: flex; align-items: center; height: 40px; padding: 0 16px 0 8px; border-bottom: 1px solid var(--line); background: var(--read-bg); cursor: pointer; position: relative; gap: 2px; }
.row.unread { background: var(--unread-bg); font-weight: 700; }
.row:hover { box-shadow: inset 1px 0 0 var(--line), inset -1px 0 0 var(--line), 0 1px 2px rgba(60,64,67,.3); z-index: 1; }
.row.selected { background: var(--accent-bg); }
.row.cursor { box-shadow: inset 3px 0 0 var(--accent); }
.row-check { width: 36px; display: flex; justify-content: center; }
.row-star { background: none; border: 0; color: var(--line); display: flex; padding: 4px; }
.row-star:hover { color: var(--muted); }
.row-star.on { color: var(--star); }
.row-who { width: 200px; flex: none; padding: 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .count { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.row-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .snip { color: var(--muted); font-weight: 400; }
.row-clip { color: var(--muted); padding: 0 8px; display: flex; }
.row-date { width: 72px; text-align: right; font-size: 12px; flex: none; padding-left: 8px; }
.row.unread .row-date { color: var(--text); }
.row-actions { display: none; position: absolute; right: 8px; top: 0; height: 100%; align-items: center; background: inherit; padding-left: 8px; }
.row-actions .icon-btn { width: 36px; height: 36px; }
.row:hover .row-actions { display: flex; }
.row:hover .row-date, .row:hover .row-clip { visibility: hidden; }
.draft-tag { color: var(--danger); font-weight: 400; }

/* conversation */
.thread-scroll { flex: 1; overflow-y: auto; padding: 0 24px 24px 56px; }
.thread-head { display: flex; align-items: center; gap: 8px; padding: 12px 0; flex-wrap: wrap; }
.thread-subject { font-size: 22px; font-weight: 400; margin: 0; }
.msg { border-bottom: 1px solid var(--line); }
.msg-collapsed { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; }
.msg-collapsed:hover { background: var(--hover); }
.msg-from { font-weight: 600; white-space: nowrap; }
.msg-snip { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.msg-head { display: flex; gap: 12px; padding: 12px 0 8px; align-items: flex-start; }
.msg-meta { flex: 1; min-width: 0; }
.msg-line2 { color: var(--muted); font-size: 12px; display: flex; align-items: center; }
.msg-email { color: var(--muted); font-size: 12px; }
.msg-right { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 12px; }
.msg-right .msg-date { margin-right: 4px; }
.star.on { color: var(--star); }
.msg-details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 6px 0; box-shadow: var(--shadow); font-size: 12px; color: var(--text); width: fit-content; max-width: 100%; }
.msg-details td { padding: 1px 6px 1px 0; vertical-align: top; }
.msg-details .k { color: var(--muted); text-align: right; }
.msg-body { padding: 4px 0 8px 52px; }
.msg-frame { width: 100%; border: 0; display: block; min-height: 40px; color-scheme: light; }
.img-bar { background: var(--surface-2); padding: 8px 12px; border-radius: 6px; margin-bottom: 8px; font-size: 13px; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 12px 52px; }
.att { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; background: var(--surface); text-align: left; }
.att:hover { background: var(--hover); }
.att-name { font-weight: 500; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-size { color: var(--muted); font-size: 12px; }
.reply-bar { display: flex; gap: 12px; padding: 24px 0 8px 52px; }

/* invite */
.invite { display: flex; gap: 14px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px 16px; margin: 6px 0 14px; background: var(--surface-2); }
.invite-ico { color: var(--accent); }
.invite-kind { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.invite-title { font-size: 18px; margin: 2px 0 6px; }
.invite-row { display: flex; gap: 8px; align-items: center; color: var(--muted); padding: 2px 0; }
.invite-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }

/* compose */
#compose-root { position: fixed; bottom: 0; right: 0; z-index: 50; pointer-events: none; }
.compose { position: fixed; bottom: 0; width: 520px; max-width: 100vw; height: 560px; max-height: 92vh; background: var(--surface); border-radius: 10px 10px 0 0; box-shadow: var(--shadow); display: flex; flex-direction: column; pointer-events: auto; border: 1px solid var(--line); }
.compose.min { height: 40px; }
.compose.min .compose-body, .compose.min .compose-foot { display: none; }
.compose.max { width: min(900px, 96vw); height: 88vh; right: 50% !important; transform: translateX(50%); bottom: 4vh; border-radius: 10px; z-index: 60; }
.compose-head { background: #404040; color: #fff; display: flex; align-items: center; padding: 0 6px 0 16px; height: 40px; border-radius: 10px 10px 0 0; cursor: pointer; flex: none; gap: 2px; }
@media (prefers-color-scheme: dark) { .compose-head { background: #3a3a40; } }
.compose-title { flex: 1; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-status { font-size: 11px; opacity: .7; margin-right: 8px; }
.compose-body { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 0 12px; overflow-y: auto; }
.rcpt-block { position: relative; }
.rcpt-row { display: flex; align-items: flex-start; border-bottom: 1px solid var(--line); min-height: 38px; }
.rcpt-label { width: 36px; color: var(--muted); padding-top: 9px; flex: none; }
.rcpt-wrap { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 4px 0; position: relative; min-width: 0; }
.rcpt-input { border: 0; outline: none; background: none; flex: 1; min-width: 120px; padding: 4px 0; }
.rcpt-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 16px; padding: 2px 4px 2px 10px; background: var(--surface-2); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcpt-chip.bad { border-color: var(--danger); color: var(--danger); }
.rcpt-chip button { border: 0; background: none; border-radius: 50%; width: 18px; height: 18px; line-height: 16px; padding: 0; color: var(--muted); }
.rcpt-chip button:hover { background: var(--hover); }
.cc-toggle { position: absolute; right: 0; top: 8px; display: flex; }
.suggest { position: absolute; top: 100%; left: 0; z-index: 70; background: var(--surface); box-shadow: var(--shadow); border-radius: 8px; min-width: 320px; padding: 6px 0; }
.sg { padding: 7px 16px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.sg.sel, .sg:hover { background: var(--hover); }
.sg-sub { color: var(--muted); }
.subject { border: 0; border-bottom: 1px solid var(--line); outline: none; padding: 10px 0; background: none; flex: none; }
.editor { flex: 1; min-height: 160px; padding: 12px 0; outline: none; overflow-wrap: anywhere; }
.editor blockquote { margin: 0 0 0 .8ex; border-left: 1px solid #ccc; padding-left: 1ex; color: var(--muted); }
.compose-atts { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; }
.att-chip { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 16px; padding: 3px 4px 3px 10px; font-size: 12px; }
.att-chip.uploading { opacity: .6; }
.att-chip button { border: 0; background: none; font-size: 16px; line-height: 1; }
.compose-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; flex: none; }
.send-group { display: flex; }
.send-btn { background: var(--accent); color: #fff; border: 0; border-radius: 18px 0 0 18px; padding: 0 22px; height: 36px; font-weight: 500; }
.send-arrow { background: var(--accent); color: #fff; border: 0; border-left: 1px solid rgba(255,255,255,.4); border-radius: 0 18px 18px 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
@media (prefers-color-scheme: dark) { .send-btn, .send-arrow { color: #062e6f; } }
.send-btn:disabled { opacity: .6; }
.fmt-bar { display: flex; align-items: center; }
.quick { display: flex; gap: 8px; margin-bottom: 12px; }

/* menus, dialogs, toasts */
.menu { position: fixed; z-index: 100; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); padding: 8px 0; min-width: 200px; max-height: 70vh; overflow-y: auto; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 8px 16px; text-align: left; }
.menu-item:hover { background: var(--hover); }
.menu-item span:not(.ico) { flex: 1; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { background: var(--surface); border-radius: 12px; width: 560px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.dialog-title { padding: 20px 24px 8px; font-size: 20px; }
.dialog-body { padding: 8px 24px; overflow-y: auto; }
.dialog-actions { padding: 12px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.addr-row { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
#toasts { position: fixed; left: 24px; bottom: 24px; z-index: 120; }
.toast { background: #323232; color: #fff; border-radius: 6px; padding: 12px 16px; display: flex; gap: 24px; align-items: center; box-shadow: var(--shadow); }
.toast .link { color: #8ab4f8; font-weight: 500; }

/* calendar */
.cal-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 16px; flex: none; }
.cal-title { font-size: 22px; font-weight: 400; margin: 0 0 0 12px; }
.cal-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mini { margin: 0 8px 8px 12px; }
.mini-head { display: flex; align-items: center; font-weight: 500; font-size: 14px; padding: 4px 0; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.mini-dow { font-size: 11px; color: var(--muted); padding: 4px 0; }
.mini-day { background: none; border: 0; width: 28px; height: 28px; margin: 1px auto; border-radius: 50%; font-size: 12px; }
.mini-day:hover { background: var(--hover); }
.mini-day.other { color: var(--muted); }
.mini-day.sel { background: var(--accent-bg); }
.mini-day.today { background: var(--accent); color: #fff; }
.cal-item { display: flex; align-items: center; gap: 12px; padding: 4px 12px 4px 26px; cursor: pointer; }
.cal-item input { display: none; }
.cal-item .box { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--c); border-radius: 3px; flex: none; }
.cal-item input:checked + .box { background: var(--c); }
.add-cal { margin: 8px 0 0 22px; }
.m-head { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; border-bottom: 1px solid var(--line); }
.m-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr); min-height: 0; }
.m-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2px 4px; overflow: hidden; cursor: pointer; min-height: 0; }
.m-cell.other { background: var(--read-bg); }
.m-num { text-align: center; font-size: 12px; padding: 2px; }
.m-num span { display: inline-block; min-width: 24px; line-height: 24px; border-radius: 12px; cursor: pointer; }
.m-num span:hover { background: var(--hover); }
.m-cell.today .m-num span { background: var(--accent); color: #fff; }
.m-more { font-size: 11px; color: var(--muted); padding: 0 4px; font-weight: 500; }
.ev { font-size: 12px; border-radius: 4px; padding: 1px 6px; margin: 1px 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; color: var(--text); display: flex; gap: 2px; position: relative; }
.ev:not(.solid)::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); align-self: center; flex: none; margin-right: 4px; }
.ev.solid { background: var(--c); color: #fff; }
.ev.declined .ev-title { text-decoration: line-through; opacity: .6; }
.ev-time { color: var(--muted); }
.ev.solid .ev-time { color: rgba(255,255,255,.85); }
.ev:not(.solid):hover { background: var(--hover); }
.t-head, .t-allday { display: grid; grid-template-columns: 56px repeat(var(--cols, 7), 1fr); flex: none; }
.t-head { padding-right: 15px; }
.t-allday { padding-right: 15px; border-bottom: 1px solid var(--line); }
.t-day { text-align: center; padding: 6px 0; cursor: pointer; }
.t-day .dow { font-size: 11px; color: var(--muted); }
.t-day .dnum { font-size: 24px; width: 46px; height: 46px; line-height: 46px; border-radius: 50%; margin: 2px auto; }
.t-day:hover .dnum { background: var(--hover); }
.t-day.today .dnum { background: var(--accent); color: #fff; }
.t-day.today .dow { color: var(--accent); }
.tz { font-size: 10px; color: var(--muted); display: block; padding-top: 42px; text-align: right; padding-right: 6px; }
.t-adcell { border-left: 1px solid var(--line); min-height: 8px; padding: 2px; }
.t-scroll { flex: 1; overflow-y: auto; display: grid; grid-template-columns: 56px repeat(var(--cols, 7), 1fr); position: relative; }
.t-gutter.hours .t-hour { height: 48px; font-size: 10px; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-6px); }
.t-col { position: relative; border-left: 1px solid var(--line); height: 1152px; cursor: pointer; }
.t-slot { height: 48px; border-bottom: 1px solid var(--line); }
.t-col .ev { position: absolute; display: block; white-space: normal; padding: 2px 6px; background: color-mix(in srgb, var(--c) 22%, var(--surface)); border-left: 3px solid var(--c); border-radius: 4px; }
.t-col .ev::before { display: none; }
.t-col .ev .ev-time { display: block; }
.t-col .ev:hover { z-index: 3; box-shadow: var(--shadow); }
.now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.now span { position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--danger); }
.ev-pop { position: fixed; z-index: 95; width: 400px; max-width: calc(100vw - 16px); background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); padding: 12px 20px 20px; }
.pop-actions { display: flex; justify-content: flex-end; }
.pop-title { display: flex; align-items: center; gap: 14px; }
.pop-title h3 { margin: 0; font-size: 20px; font-weight: 400; }
.pop-title .dot { width: 14px; height: 14px; border-radius: 4px; background: var(--c); flex: none; }
.pop-row, .pop-guests { display: flex; gap: 14px; color: var(--text); margin-top: 8px; padding-left: 28px; align-items: flex-start; }
.pop-guests { padding-left: 0; }
.pop-row .ico, .pop-guests .ico { color: var(--muted); }
.guest { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
.st { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: inline-block; }
.st.accepted { background: #188038; } .st.declined { background: var(--danger); } .st.tentative { background: var(--star); }
.pop-rsvp { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-left: 28px; }
.event-form { display: flex; flex-direction: column; gap: 12px; }
.title-field { font-size: 22px; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; padding-left: 0; }
.ef-row { display: flex; gap: 14px; align-items: center; color: var(--muted); }
.ef-row .ico { align-self: flex-start; margin-top: 8px; }
.ef-row .field { width: auto; flex: 1; }
.ef-dt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
.ef-dt .field { flex: 0 0 auto; width: auto; padding: 6px 8px; }
.ef-grow { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; position: relative; }
.ef-grow .rcpt-row { border: 0; }
.inline { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }

/* lists page */
.page-scroll { flex: 1; overflow-y: auto; padding: 24px 32px; }
.lists-page { max-width: 880px; }
.page-title { font-size: 24px; font-weight: 400; margin: 0 0 4px; }
.card { border: 1px solid var(--line); border-radius: 12px; margin: 20px 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: var(--surface-2); }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.list-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.lr-main { flex: 1; min-width: 0; }
.lr-title { font-weight: 500; }
.lr-members { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.lr-actions { display: flex; align-items: center; gap: 4px; }

/* responsive */
@media (max-width: 900px) {
  .topbar .logo span, .rail { display: none; }
  .topbar .logo { width: auto; }
  .sidebar { position: fixed; z-index: 40; top: 64px; bottom: 0; left: 0; background: var(--bg); box-shadow: var(--shadow); }
  .nav-collapsed .sidebar { margin-left: -260px; }
  body:not(.nav-collapsed) .sidebar { margin-left: 0; }
  .shell { padding: 0 4px; }
  .row-who { width: 110px; }
  .thread-scroll { padding: 0 12px 24px; }
  .msg-body, .attachments, .reply-bar { padding-left: 0; }
  .compose { right: 0 !important; width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
}
