@font-face {
  font-family: Lato;
  src: url("/static/fonts/Lato-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Lato;
  src: url("/static/fonts/Lato-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Lato;
  src: url("/static/fonts/Lato-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Lato;
  src: url("/static/fonts/Lato-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root, html[data-theme="azul"] {
  color-scheme: light;
  --rail: #0B0B3A;
  --sidebar: #10104F;
  --sidebar-text: #ffffff;
  --sidebar-muted: rgba(255, 255, 255, .72);
  --sidebar-hover: rgba(255, 255, 255, .08);
  --sidebar-active: #1599FF;
  --sidebar-active-text: #ffffff;
  --accent: #1599FF;
  --online: #15F35B;
  --main: #ffffff;
  --text: #1d1c1d;
  --muted: #616061;
  --border: #e8e8e8;
  --hover: #f8f8f8;
  --topbar: #ffffff;
  --composer: #ffffff;
  --composer-border: #c1c1c4;
  --chip: #f4f4f6;
  --mention: #e7f5ff;
  --mention-text: #0b6fbe;
  --code: #f4f4f6;
  --danger: #e01e5a;
  --shadow: 0 4px 16px rgba(0, 0, 0, .16);
  --rail-icon: #ffffff;
  --rail-muted: rgba(255, 255, 255, .72);
  --rail-active: rgba(255, 255, 255, .14);
  --link: #1599FF;
  --scroll: rgba(0, 0, 0, .28);
  --panel: #ffffff;
  --flash: rgba(21, 153, 255, .2);
  --send: #1599FF;
  --search-bg: #f4f4f8;
  --sidebar-edge: transparent;
  --rail-edge: transparent;
  --own-mention: #fff8e6;
  --intro: #10104F;
}

html[data-theme="escuro"] {
  color-scheme: dark;
  --rail: #121016;
  --sidebar: #19171D;
  --sidebar-text: #e8e8e8;
  --sidebar-muted: #ababad;
  --sidebar-hover: #27242c;
  --sidebar-active: #1164a3;
  --sidebar-active-text: #ffffff;
  --accent: #1d9bd1;
  --online: #15F35B;
  --main: #1A1D21;
  --text: #d1d2d3;
  --muted: #9a9b9e;
  --border: #35373b;
  --hover: #222529;
  --topbar: #1A1D21;
  --composer: #222529;
  --composer-border: #565856;
  --chip: #2c2f33;
  --mention: #16384a;
  --mention-text: #8ec7ff;
  --code: #2a2d31;
  --danger: #e01e5a;
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  --rail-icon: #ffffff;
  --rail-muted: rgba(255, 255, 255, .68);
  --rail-active: rgba(255, 255, 255, .1);
  --link: #1d9bd1;
  --scroll: rgba(255, 255, 255, .22);
  --panel: #1A1D21;
  --flash: rgba(29, 155, 209, .28);
  --send: #1599FF;
  --search-bg: #222529;
  --sidebar-edge: #2e2a32;
  --rail-edge: transparent;
  --own-mention: #3d3420;
  --intro: #d1d2d3;
}

html[data-theme="claro"] {
  color-scheme: light;
  --rail: #ffffff;
  --sidebar: #F8F8FA;
  --sidebar-text: #1d1c1d;
  --sidebar-muted: #616061;
  --sidebar-hover: #ececf1;
  --sidebar-active: #1599FF;
  --sidebar-active-text: #ffffff;
  --accent: #1599FF;
  --online: #15F35B;
  --main: #ffffff;
  --text: #1d1c1d;
  --muted: #616061;
  --border: #e6e6ea;
  --hover: #f6f6f8;
  --topbar: #ffffff;
  --composer: #ffffff;
  --composer-border: #c7c7cd;
  --chip: #f0f0f3;
  --mention: #e7f5ff;
  --mention-text: #0b6fbe;
  --code: #f4f4f6;
  --danger: #e01e5a;
  --shadow: 0 4px 16px rgba(0, 0, 0, .1);
  --rail-icon: #1d1c1d;
  --rail-muted: #616061;
  --rail-active: #ececf1;
  --link: #1264a3;
  --scroll: rgba(0, 0, 0, .28);
  --panel: #ffffff;
  --flash: rgba(21, 153, 255, .18);
  --send: #1599FF;
  --search-bg: #ffffff;
  --sidebar-edge: #e6e6ea;
  --rail-edge: #e6e6ea;
  --own-mention: #fff8e6;
  --intro: #1d1c1d;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html[data-font="system"] body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
html[data-gradient="1"] .main {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, var(--main)) 0%, var(--main) 220px);
}
body {
  font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--main);
  overflow: hidden;
}
button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: default; }
img { max-width: 100%; }
.hidden { display: none !important; }
a { color: var(--link); }

.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  background: var(--rail);
  padding: 32px 16px;
}
html[data-theme="claro"] .login { background: #eef0f4; }
html[data-theme="escuro"] .login { background: #121016; }
.login-card {
  width: min(420px, 100%);
  background: #fff;
  color: #1d1c1d;
  border-radius: 12px;
  padding: 36px 32px 28px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .28);
}
html[data-theme="escuro"] .login-card {
  background: #222529;
  color: #e8e8e8;
}
.login-logo { height: 32px; width: auto; display: block; margin-bottom: 22px; }
html[data-theme="escuro"] .login-logo { filter: brightness(0) invert(1); }
.login-card h1 { font-size: 26px; margin: 0 0 8px; font-weight: 700; letter-spacing: -.02em; }
.login-card p { margin: 0 0 18px; color: #616061; line-height: 1.45; font-size: 14px; }
html[data-theme="escuro"] .login-card p { color: #ababad; }
.login-card label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.login-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid #c7c7cd;
  padding: 0 12px;
  background: #fff;
  color: #1d1c1d;
  outline: none;
}
.login-card input:focus { border-color: #1599FF; box-shadow: 0 0 0 1px #1599FF; }
html[data-theme="escuro"] .login-card input { background: #1a1d21; border-color: #565856; color: #e8e8e8; }
.btn-primary {
  width: 100%;
  height: 40px;
  border-radius: 6px;
  background: #1599FF;
  color: #fff;
  font-weight: 700;
}
.btn-primary:hover { filter: brightness(1.05); }
.login-card .btn-primary { width: 100%; margin-top: 4px; }
.login-error { color: #e01e5a !important; font-weight: 700; }

.app { height: 100%; display: flex; background: var(--main); color: var(--text); }
.rail {
  width: 70px;
  flex: none;
  background: var(--rail);
  color: var(--rail-icon);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 10px;
  border-right: 1px solid var(--rail-edge);
}
.rail-brand {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .12);
}
.rail-brand img { width: 20px; height: 26px; display: block; object-fit: contain; }
.rail-nav { display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: center; }
.rail-btn {
  width: 52px;
  height: 48px;
  border-radius: 8px;
  color: var(--rail-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
}
.rail-btn svg { width: 20px; height: 20px; }
.rail-btn span { font-size: 10px; line-height: 1.1; font-weight: 700; }
.rail-btn:hover, .rail-btn.active { background: var(--rail-active); color: var(--rail-icon); }
.rail-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.rail-badge[hidden] { display: none !important; }
.rail-me {
  margin-top: auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1599FF;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  position: relative;
}
.rail-me::after, .avatar .presence {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  right: -2px;
  bottom: -2px;
  background: #8d8d8d;
  box-shadow: 0 0 0 2px var(--rail);
}
.rail-me.online::after, .avatar .presence.on, .dot.on, .presence-pip.on { background: var(--online); }
.avatar { overflow: visible; }
.avatar.photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: inherit; display: block; }
.presence.away, .dot.away { background: #c6c6c6 !important; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 48px;
  flex: none;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  background:
    linear-gradient(var(--sidebar), var(--sidebar)) left top / 260px 100% no-repeat,
    var(--topbar);
  border-bottom: 1px solid var(--border);
  padding: 0 16px 0 0;
}
.search-wrap { position: relative; grid-column: 2; width: min(520px, calc(100% - 8px)); justify-self: center; }
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
#search-input {
  width: 100%;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--search-bg);
  color: var(--text);
  padding: 0 12px 0 32px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
#search-input::-webkit-search-decoration,
#search-input::-webkit-search-cancel-button { display: none; }
#search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.search-pop {
  position: absolute;
  z-index: 30;
  top: 38px;
  left: 0;
  right: 0;
  background: var(--main);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: 420px;
  overflow: auto;
  padding: 6px 0;
}
.search-sec { padding: 8px 14px 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.search-item, .menu-item, .mention-item {
  display: flex;
  width: 100%;
  text-align: left;
  gap: 8px;
  align-items: center;
  padding: 7px 14px;
  color: var(--text);
}
.search-item:hover, .menu-item:hover, .mention-item:hover, .mention-item.active { background: var(--hover); }
.search-item small, .menu-item small { color: var(--muted); margin-left: auto; }
.search-empty { padding: 16px; color: var(--muted); }

.columns { flex: 1; min-height: 0; display: flex; }
.sidebar {
  width: 260px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--sidebar);
  color: var(--sidebar-text);
  overflow: auto;
  border-right: 1px solid var(--sidebar-edge);
  padding-bottom: 16px;
}
.section-h {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 14px 8px 2px;
  padding: 2px 6px;
  color: var(--sidebar-muted);
  font-size: 13px;
  font-weight: 700;
}
.section-h .label { flex: 1; text-align: left; }
.section-h .chev { width: 16px; transition: transform .12s ease; }
.section-h.collapsed .chev { transform: rotate(-90deg); }
.icon-mini {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--sidebar-muted);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.icon-mini:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }
.chan {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 16px);
  margin: 1px 8px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--sidebar-muted);
  text-align: left;
  font-size: 15px;
}
.chan:hover { background: var(--sidebar-hover); }
.chan.active { background: var(--sidebar-active); color: var(--sidebar-active-text); }
.chan.unread { color: var(--sidebar-text); font-weight: 700; }
.chan .hash, .chan .lock { width: 16px; flex: none; opacity: .85; text-align: center; }
.chan .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan .count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--badge, var(--danger));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.chan .count.quiet { background: transparent; color: var(--sidebar-text); }
.dm-row { height: auto; min-height: 44px; padding: 6px 8px; align-items: flex-start; }
.dm-row .sub { display: block; font-size: 12px; font-weight: 400; color: var(--sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan.active .sub { color: rgba(255,255,255,.85); }
.side-empty { margin: 8px 16px; color: var(--sidebar-muted); font-size: 13px; }
.dot, .presence-pip {
  position: relative;
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: #8d8d8d;
  right: auto;
  bottom: auto;
  box-shadow: none;
}
.presence-pip.away, .dot.away { background: #c6c6c6; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
  font-size: 14px;
  cursor: pointer;
}
.avatar.sm { width: 20px; height: 20px; border-radius: 4px; font-size: 9px; }
.avatar .presence { box-shadow: 0 0 0 2px var(--main); }
.avatar.lg { width: 72px; height: 72px; border-radius: 10px; font-size: 28px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--main); position: relative; }
.channel-header {
  height: 49px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--border);
}
.ch-title { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 10px; }
.ch-name { font-weight: 900; font-size: 16px; white-space: nowrap; }
.ch-topic {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: none;
  text-align: left;
}
.ch-topic:hover { color: var(--text); }
.ch-actions { display: flex; gap: 4px; flex: none; }
.head-btn {
  height: 28px;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
}
.head-btn:hover { background: var(--hover); color: var(--text); }
.head-btn svg { width: 16px; height: 16px; }

.messages, .panel-scroll, .alt-view { flex: 1; overflow: auto; }
.messages { padding: 8px 0 12px; }
.intro { padding: 24px 20px 8px; }
.intro h1 { margin: 8px 0 4px; font-size: 28px; letter-spacing: -.03em; }
.intro p { margin: 0; color: var(--muted); max-width: 640px; }
.intro-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--hover);
  color: var(--intro);
  font-weight: 900;
  font-size: 22px;
}
.day-divider, .new-div {
  display: flex;
  align-items: center;
  margin: 14px 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.day-divider::before, .day-divider::after, .new-div::before, .new-div::after {
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
}
.day-divider span, .new-div span {
  padding: 2px 12px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--main);
}
.new-div { color: var(--danger); }
.new-div::before, .new-div::after { background: var(--danger); }
.load-more {
  display: block;
  margin: 8px auto;
  color: var(--link);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
}
.load-more:hover { background: var(--hover); }

.msg {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 6px 20px 6px 16px;
}
.msg:hover { background: var(--hover); }
.msg.mention-me { background: var(--own-mention); }
.msg.flash { animation: flash 1.6s ease; }
@keyframes flash { from { background: var(--flash); } to { background: transparent; } }
.msg.compact { padding-top: 1px; padding-bottom: 1px; }
.msg.compact .msg-meta { display: none; }
.gutter-time {
  width: 36px;
  flex: none;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  padding-top: 3px;
  opacity: 0;
}
.msg.compact:hover .gutter-time { opacity: 1; }
.msg-body { min-width: 0; flex: 1; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; }
.author { font-weight: 900; }
.author:hover { text-decoration: underline; }
.mention-all { background: #f8e8a0; color: #1d1c1d; }
.time { color: var(--muted); font-size: 12px; }
.edited { color: var(--muted); font-size: 12px; }
.text { line-height: 1.46; word-wrap: break-word; overflow-wrap: anywhere; }
.text p { margin: 0; }
.text code, .codeblock {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.text code { background: var(--code); padding: 1px 4px; border-radius: 3px; }
.codeblock {
  background: var(--code);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  overflow: auto;
  margin: 4px 0;
}
.text ul, .text ol { margin: 4px 0; padding-left: 22px; }
.text ul { list-style: disc; }
.text ol { list-style: decimal; }
.text li { margin: 1px 0; }
.mention {
  background: var(--mention);
  color: var(--mention-text);
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 700;
}
.deleted-text { color: var(--muted); font-style: italic; }
.msg-actions {
  display: none;
  position: absolute;
  top: -16px;
  right: 20px;
  background: var(--main);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.msg:hover .msg-actions, .msg:focus-within .msg-actions { display: flex; }
.msg-actions button {
  width: 32px;
  height: 32px;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.msg-actions button:hover { background: var(--hover); color: var(--text); }
.msg-actions svg { width: 16px; height: 16px; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react {
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 8px;
  background: var(--main);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}
.react.me { background: var(--mention); border-color: var(--accent); color: var(--mention-text); }
.react:hover { border-color: var(--accent); }
.reply-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--link);
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 4px;
}
.reply-bar:hover { background: var(--hover); }
.reply-avatars { display: flex; }
.reply-avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--main); }
.reply-avatars .avatar:first-child { margin-left: 0; }
.reply-last { color: var(--muted); font-weight: 400; }
.attach { margin-top: 6px; }
.attach img {
  max-width: min(420px, 100%);
  max-height: 320px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}
.file-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  max-width: 360px;
  text-decoration: none;
  color: var(--text);
}
.file-card:hover { background: var(--hover); }
.edit-box textarea, .modal input, .modal textarea, .topic-input {
  width: 100%;
  border: 1px solid var(--composer-border);
  border-radius: 6px;
  background: var(--composer);
  color: var(--text);
  padding: 8px;
  outline: none;
}
.edit-box textarea:focus, .modal input:focus, .topic-input:focus { border-color: var(--accent); }
.edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-weight: 700;
  background: var(--hover);
}
.btn.primary { background: var(--send); color: #fff; }
.btn.danger { color: var(--danger); }

.typing { min-height: 22px; padding: 0 20px 2px; color: var(--muted); font-size: 13px; }
.composer {
  margin: 0 20px 16px;
  border: 1px solid var(--composer-border);
  border-radius: 8px;
  background: var(--composer);
  display: flex;
  flex-direction: column;
}
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.composer.drag { outline: 2px dashed var(--accent); }
.fmtbar, .composer-actions { display: flex; align-items: center; gap: 2px; padding: 4px 6px; }
.fmtbar { border-bottom: 1px solid var(--border); }
.fmtbar button, .icon-btn {
  width: 30px;
  height: 28px;
  border-radius: 4px;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.fmtbar button:hover, .icon-btn:hover { background: var(--hover); color: var(--text); }
.fmtbar svg, .icon-btn svg { width: 16px; height: 16px; }
.fmt-sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.composer textarea, .composer-box {
  border: 0;
  resize: none;
  outline: none;
  background: transparent;
  padding: 8px 12px 4px;
  min-height: 42px;
  max-height: 200px;
  line-height: 1.45;
}
.composer-box { overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
.composer-box[data-empty="1"]::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.token { display: inline-flex; align-items: center; vertical-align: text-bottom; }
.mention-chip { background: #e8f5ff; color: #1264a3; border-radius: 4px; padding: 0 4px; font-weight: 700; }
.token img { width: 22px; height: 22px; object-fit: contain; }
.fmt-menu { position: relative; }
.fmt-menu summary { list-style: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; cursor: pointer; font-size: 16px; }
.fmt-menu summary::-webkit-details-marker { display: none; }
.fmt-menu[open] summary, .fmt-menu summary:hover { background: var(--hover); }
.fmt-pop { position: absolute; top: 32px; left: 0; z-index: 6; width: 180px; background: var(--main); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: 4px 0; }
.fmt-pop button { display: block; width: 100%; text-align: left; padding: 8px 12px; }
.fmt-pop button:hover { background: var(--hover); }
.grow { flex: 1; }
.send {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--send);
  color: #fff;
  display: grid;
  place-items: center;
}
.send:disabled { background: var(--chip); color: var(--muted); }
.send svg { width: 16px; height: 16px; }
.file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: fit-content;
  max-width: calc(100% - 20px);
  background: var(--chip);
}
.file-chip img { width: 56px; height: 40px; object-fit: cover; border-radius: 4px; }
.file-chip audio { height: 32px; width: 220px; }
.rec-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 6px;
  padding: 6px 8px;
  border: 1px solid #f0c2c2;
  border-radius: 8px;
  background: #fff4f4;
}
.rec-bar.hidden { display: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e01e5a; animation: recblink 1s infinite; }
.rec-bar.paused .rec-dot { animation: none; background: #8d8d8d; }
@keyframes recblink { 50% { opacity: .25; } }
.rec-bar button { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border); background: #fff; font-weight: 700; }
.rec-bar audio { height: 32px; width: 180px; }
.icon-btn.rec-on { color: #e01e5a; background: #fff0f3; }
.file-chip button { color: var(--muted); font-size: 16px; padding: 0 4px; }

.alt-view { padding: 8px 0 24px; }
.alt-head { padding: 16px 20px 8px; }
.alt-head h1 { margin: 0; font-size: 22px; }
.alt-item {
  display: block;
  width: calc(100% - 24px);
  margin: 2px 12px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
}
.alt-item:hover { background: var(--hover); }
.alt-item b { font-weight: 900; }
.alt-item .where { color: var(--link); font-weight: 700; }
.alt-item p { margin: 4px 0 0; color: var(--text); }
.empty-main { margin: auto; text-align: center; color: var(--muted); padding: 48px 20px; }
.empty-main h2 { color: var(--text); margin-bottom: 6px; }

.panel {
  width: min(420px, 40vw);
  flex: none;
  border-left: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-width: 300px;
}
.panel-head {
  height: 49px;
  display: flex;
  align-items: center;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 900;
}
.panel-head #panel-title { flex: 1; min-width: 0; }
#panel-close { width: 36px; height: 36px; border-radius: 6px; font-size: 22px; color: var(--muted); }
#panel-close:hover { background: var(--hover); color: var(--text); }
.thread-root { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.thread-composer { margin: 12px; }
.profile { padding: 20px; }
.profile h2 { margin: 12px 0 4px; }
.profile .mail { color: var(--muted); margin: 0 0 16px; }
.status-line { display: flex; align-items: center; gap: 8px; font-weight: 700; }

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal {
  width: min(520px, 100%);
  background: var(--main);
  color: var(--text);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px 20px 16px;
}
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.modal .hint { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.modal label { display: block; font-size: 13px; font-weight: 700; margin: 10px 0; }
.modal input[type="radio"], .modal input[type="checkbox"], .modal input[type="file"] {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}
.modal label.radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 15px;
  margin: 14px 0;
}
.modal label.radio input { margin-top: 3px; flex: none; }
.modal label.radio small { display: block; color: var(--muted); font-weight: 400; }
.modal .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.people-pick { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.people-pick label { margin: 0; padding: 8px 10px; display: flex; gap: 8px; align-items: center; font-weight: 400; }
.people-pick label:hover { background: var(--hover); }

.popover {
  position: fixed;
  z-index: 50;
  min-width: 180px;
  max-width: 280px;
  background: var(--main);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 6px 0;
}
.popover .menu-item { padding: 7px 12px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 6px; }
.emoji-grid button { height: 32px; border-radius: 6px; font-size: 18px; }
.emoji-grid button:hover { background: var(--hover); }
.toast {
  position: fixed;
  left: 86px;
  bottom: 16px;
  z-index: 60;
  background: #1d1c1d;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 360px;
}
html[data-theme="escuro"] .toast { background: #f4f4f6; color: #1d1c1d; }

.sidebar::-webkit-scrollbar, .messages::-webkit-scrollbar, .panel-scroll::-webkit-scrollbar, .search-pop::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb, .messages::-webkit-scrollbar-thumb, .panel-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.sidebar:hover::-webkit-scrollbar-thumb, .messages:hover::-webkit-scrollbar-thumb, .panel-scroll:hover::-webkit-scrollbar-thumb { background: var(--scroll); }

@media (max-width: 960px) {
  .sidebar { width: 220px; }
  .panel { width: 320px; min-width: 0; }
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 6px;
  background: #1599FF;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.btn-google:hover { filter: brightness(1.05); }
.btn-google[hidden] { display: none !important; }
.login-version { margin: 16px 0 0 !important; font-size: 12px; color: #8d8d8d !important; font-weight: 400; }
.onboard {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(21, 153, 255, .18), transparent 60%),
    var(--main, #fff);
}
.onboard-card {
  width: min(460px, 100%);
  background: var(--main);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 28px 22px;
  box-shadow: var(--shadow);
}
.onboard-card h1 { margin: 0 0 6px; font-size: 26px; }
.onboard-card p { color: var(--muted); margin: 0 0 16px; }
.onboard-card label { display: block; font-weight: 700; font-size: 13px; margin: 12px 0; }
.onboard-card input[type="text"], .onboard-card input:not([type="range"]):not([type="file"]) {
  width: 100%;
  margin-top: 6px;
  height: 40px;
  border: 1px solid var(--composer-border);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--composer);
  color: var(--text);
}
.crop-wrap { display: grid; justify-items: center; gap: 10px; margin-bottom: 8px; }
.crop-stage {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #e8e8e8;
  position: relative;
  touch-action: none;
  cursor: grab;
}
.crop-stage img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
.crop-stage::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0,0,0,.35);
  pointer-events: none;
}
#crop-zoom { width: 220px; }
.crop-actions { display: flex; gap: 8px; }
.status-edit { display: flex; gap: 8px; margin-top: 6px; }
.emoji-trigger {
  width: 40px;
  height: 40px;
  border: 1px solid var(--composer-border);
  border-radius: 6px;
  font-size: 20px;
  background: var(--composer);
}
.status-edit input { flex: 1; margin-top: 0 !important; }
.side-search, .side-shortcuts, .section { display: block; width: 100%; flex: none; }
.side-search { padding: 10px 10px 4px; }
.side-search input {
  display: block;
  width: 100%;
  height: 32px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.12);
  color: #fff;
  padding: 0 10px;
}
html[data-theme="claro"] .side-search input { background: #fff; border-color: #ddd; color: #1d1c1d; }
.side-link, .app-row, .chan.add {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 12px);
  margin: 1px 6px;
  min-height: 30px;
  height: auto;
  padding: 4px 8px;
  border-radius: 6px;
  color: inherit;
  text-align: left;
  font-weight: 400;
  white-space: nowrap;
}
.app-row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side-link:hover, .app-row:hover, .chan.add:hover { background: var(--side-hover, rgba(255,255,255,.08)); }
.app-mark {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #5e5d60;
}
.app-mark.calendar { background: #1a73e8; }
.app-mark.drive { background: #0f9d58; }
.app-mark.meet { background: #00897b; }
.app-mark.gmail { background: #ea4335; }
.app-mark.gitlab { background: #e24329; }
.account-card { width: 320px; padding: 8px 0 4px; }
.account-head { display: flex; gap: 10px; align-items: center; padding: 8px 14px 10px; }
.account-head b { display: block; font-size: 16px; }
.presence-label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.presence-label i { width: 9px; height: 9px; border-radius: 50%; background: #15F35B; display: inline-block; }
.presence-label.away i { background: #ccc; }
.status-btn {
  margin: 0 12px 8px;
  width: calc(100% - 24px);
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
}
.menu-split { display: flex; }
.menu-split .menu-item { flex: 1; }
.menu-split .hint { color: var(--muted); font-size: 12px; }
.profile-hero { background: transparent; }
.profile-photo { padding: 16px 20px 0; }
.profile-photo img, .profile-face {
  width: min(100%, 260px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #e8e8e8;
}
.profile-face { display: grid; place-items: center; font-size: 64px; color: #fff; font-weight: 700; }
.name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.name-row h2 { margin: 8px 0; }
.name-row button, .section-edit { color: var(--link); font-weight: 700; }
.setup-card { margin: 8px 10px 12px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.08); color: var(--sidebar-text); }
.setup-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; }
.setup-bar { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 12px; }
.setup-bar i { flex: 1; height: 6px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
.setup-bar i span { display: block; height: 100%; background: #7dbe3b; }
.setup-card .task { display: flex; gap: 8px; width: 100%; text-align: left; color: inherit; padding: 5px 0; }
.setup-card .task.done { opacity: .6; text-decoration: line-through; }
#photo-crop { margin: 8px 0 12px; }
#photo-stage { width: 220px; max-width: 100%; height: 220px; position: relative; overflow: hidden; border-radius: 8px; background: #ddd; touch-action: none; cursor: grab; }
#photo-stage img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: start; padding: 4px 22px 0; }
.edit-grid label { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 0 0 12px; }
.edit-grid input, .edit-grid select { display: block; width: 100%; height: 40px; line-height: normal; margin: 0; }
.edit-photo { min-width: 0; }
.edit-grid img, .edit-grid .profile-face { width: 220px; max-width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.modal.wide .wizard-foot { padding: 8px 22px 16px; }
.profile-body { padding: 8px 20px 24px; }
.profile-body h2 { margin: 8px 0 10px; font-size: 22px; }
.profile-line { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--text); }
.profile-actions { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.profile-actions .btn { background: #fff; border: 1px solid var(--border); }
html[data-theme="escuro"] .profile-actions .btn { background: #1a1d21; }
.profile h3 { margin: 16px 0 8px; font-size: 15px; }
.contact-row { display: flex; gap: 10px; align-items: center; }
.contact-row a { color: var(--link); font-weight: 700; text-decoration: none; }
.dm-mini { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 0; font-weight: 700; }
.popover.wide { width: min(380px, 92vw); max-width: none; padding: 0; }
.emoji-panel { width: 360px; }
.emoji-tabs { display: flex; gap: 16px; padding: 8px 12px 0; font-weight: 800; }
.emoji-tabs button { height: 36px; border-bottom: 2px solid transparent; color: var(--muted); }
.emoji-tabs button.on { color: var(--text); border-color: #611f69; }
.emoji-cats { display: flex; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--border); overflow: auto; }
.emoji-cats button { width: 32px; height: 32px; border-radius: 6px; font-size: 16px; }
.emoji-cats button.on { background: var(--hover); }
.emoji-search { margin: 8px 10px; }
.emoji-search input { width: 100%; height: 36px; border: 1px solid #1264a3; border-radius: 8px; padding: 0 10px; background: var(--composer); color: var(--text); }
.emoji-scroll { max-height: 280px; overflow: auto; padding: 0 8px 8px; }
.emoji-scroll h4 { margin: 8px 4px; font-size: 13px; }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px; }
.sticker-grid button { height: 72px; border-radius: 8px; font-size: 36px; background: var(--hover); }
.emoji-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--border); font-size: 13px; }
.emoji-foot .btn { height: 32px; padding: 0 10px; }
.emoji-foot .skin-label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.emoji-grid img, .custom-emoji { width: 22px; height: 22px; object-fit: contain; vertical-align: text-bottom; }
.react .custom-emoji { width: 16px; height: 16px; }
.cmd-list button { display: block; width: 100%; text-align: left; padding: 8px 12px; }
.cmd-list button small { display: block; color: var(--muted); font-weight: 400; }
.cmd-list button.active, .cmd-list button:hover { background: var(--hover); }
.cmd-foot { padding: 6px 12px 8px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); }
.icon-btn.aa { width: auto; padding: 0 6px; font-family: Georgia, serif; }
.msg.me-line .text { font-style: italic; }
.attach.expanded img { max-width: 100%; max-height: none; }
.app-item { display: block; width: 100%; text-align: left; padding: 8px 0; border-bottom: 1px solid var(--border); }
.app-item b { display: block; }
.app-item span { color: var(--muted); font-size: 12px; }
.btn.green { background: #007a5a; color: #fff; }
.btn:disabled { opacity: .45; }
.wizard-head, .wizard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wizard-foot { margin-top: 22px; color: var(--muted); font-size: 13px; }
.name-field { display: flex; align-items: center; gap: 8px; border: 1px solid #1264a3; border-radius: 8px; padding: 0 10px; }
.name-field input { border: 0; height: 42px; flex: 1; background: transparent; color: var(--text); outline: none; }
.radio { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.radio small { color: var(--muted); }
.suggest { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 0; text-align: left; }
.suggest b { margin-left: auto; color: var(--muted); }
.agent-pill { display: inline-block; margin-left: 6px; padding: 0 4px; border-radius: 4px; background: #e8e8e8; color: #444; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.mention-list, .colon-list { max-height: 280px; overflow: auto; }
.colon-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 12px; text-align: left; }
.colon-item .code { flex: 1; font-weight: 700; }
.colon-item .face, .colon-item img { width: 22px; height: 22px; font-size: 18px; object-fit: contain; }
.colon-item.active, .colon-item:hover { background: #1264a3; color: #fff; }
.mention-item { display: flex; align-items: center; gap: 8px; }
.mention-name { display: flex; align-items: center; gap: 6px; flex: 1; }
.mention-out { color: var(--muted); font-size: 12px; margin-left: auto; }
.mention-ico { width: 28px; text-align: center; }
.menu-item.danger { color: #e01e5a; }
.meet-link { color: var(--link); font-weight: 800; text-decoration: none; }
.dm-intro { display: grid; justify-items: start; gap: 8px; padding: 28px 20px 8px; }
.dm-intro-name { display: flex; align-items: center; gap: 8px; }
.dm-intro h1 { margin: 0; }
.linkish { color: var(--link); font-weight: 700; }
.agent-card { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.agent-card div { flex: 1; }
.agent-card span { display: block; color: var(--muted); font-size: 13px; }
.status-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #1264a3;
  border-radius: 8px;
  padding: 6px 8px;
  margin-top: 8px;
}
.status-box input { flex: 1; border: 0; height: 36px; background: transparent; color: var(--text); outline: none; }
.status-clear { width: 28px; height: 28px; border-radius: 50%; color: var(--muted); font-size: 16px; }
.status-clear:hover { background: var(--hover); }
.status-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.status-presets button { border: 1px solid var(--border); border-radius: 16px; padding: 4px 10px; font-size: 13px; }
select {
  appearance: none;
  -webkit-appearance: none;
  height: 36px;
  line-height: 36px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--main);
  color: var(--text);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.2 6 6.2 11 1.2' fill='none' stroke='%23616061' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
}
.duration { width: 100%; height: 40px; border-radius: 8px; padding: 0 32px 0 12px; }
.check-pause { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 14px 0; }
.custom-range { display: flex; gap: 8px; margin-top: 8px; }
.custom-range input { flex: 1; height: 36px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; background: var(--main); color: var(--text); }
.hover-card {
  position: fixed;
  z-index: 80;
  width: 260px;
  background: #1a1d21;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  padding: 12px;
  display: flex;
  gap: 10px;
}
.hover-card img, .hover-card .avatar { width: 36px; height: 36px; border-radius: 4px; }
.hover-card b { display: block; }
.hover-card .sub { color: #d1d2d3; font-size: 13px; margin-top: 2px; }
.hover-card .when { color: #ababad; font-size: 13px; }
.profile-photo-actions { display: flex; gap: 8px; margin: 8px 0 4px; flex-wrap: wrap; }
.name-field.bad { border-color: #e01e5a; }
.name-error { color: #e01e5a; font-size: 13px; margin: 8px 0 0; display: flex; gap: 6px; }
.invite-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border: 1px solid #1264a3;
  border-radius: 8px;
  padding: 6px;
  min-height: 46px;
}
.invite-box input {
  width: auto !important;
  flex: 1;
  min-width: 140px;
  border: 0 !important;
  background: transparent !important;
  height: 32px;
  padding: 0 6px !important;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--hover);
  border-radius: 6px;
  padding: 2px 6px 2px 2px;
  font-size: 14px;
}
.chip button { width: 18px; height: 18px; border-radius: 4px; color: var(--muted); }
.suggests { max-height: 260px; overflow: auto; margin-top: 8px; }
.suggest, .already {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  text-align: left;
}
.suggest:hover { background: var(--hover); }
.suggest b { margin-left: auto; color: var(--accent); font-size: 18px; }
.already { color: var(--muted); }
.page { padding: 28px 32px 48px; max-width: 980px; }
.page h1 { margin: 0; font-size: 28px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hero-circle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #e7f8ee;
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 22px;
}
html[data-theme="escuro"] .hero-circle { background: #1d3a2a; }
.hero-circle h2 { margin: 0 0 6px; font-size: 20px; }
.hero-circle p { margin: 0 0 14px; color: var(--muted); max-width: 560px; }
.live-list, .file-list, .out-list { display: flex; flex-direction: column; gap: 8px; }
.live-row, .file-row, .out-row, .dir-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--main);
}
.live-row:hover, .file-row:hover, .out-row:hover, .dir-row:hover { background: var(--hover); }
.live-row span, .file-row span, .out-row span, .dir-row div { flex: 1; min-width: 0; }
.out-banner {
  background: #f8f3e8;
  border-radius: 12px;
  padding: 22px 24px;
  margin: 16px 0;
}
html[data-theme="escuro"] .out-banner { background: #2a261c; }
.out-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin-top: 8px; }
.out-tabs button { height: 40px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; }
.out-tabs button.on { color: var(--text); border-bottom-color: #1264a3; }
.file-tools { display: flex; gap: 8px; align-items: center; margin: 8px 0 16px; }
.file-tools input { flex: 1; height: 38px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; background: var(--main); color: var(--text); }
.drive-card {
  border: 1px solid #1264a3;
  background: #e8f5ff;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
}
html[data-theme="escuro"] .drive-card { background: #16324a; }
.huddle-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1d21;
  color: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
}
.huddle-dock .faces { display: flex; gap: 4px; }
.huddle-dock button { color: #fff; height: 32px; padding: 0 10px; border-radius: 8px; background: #35373b; }
.huddle-dock button.leave { background: #e01e5a; }
.dir-search { width: min(420px, 100%); height: 38px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; margin-bottom: 14px; background: var(--main); color: var(--text); }
.invite-banner {
  position: relative;
  margin: 12px 16px 0;
  background: #e8f7ff;
  border-radius: 8px;
  padding: 18px 48px 18px 20px;
}
html[data-theme="escuro"] .invite-banner { background: #16324a; }
.invite-banner h2 { margin: 0 0 6px; font-size: 18px; }
.invite-banner p { margin: 0 0 12px; color: var(--muted); max-width: 640px; }
.invite-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 6px; font-size: 20px; color: var(--muted); }
.invite-x:hover { background: rgba(0,0,0,.06); }
.invite-box textarea, .invite-box input { width: 100%; min-height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 8px; background: var(--main); color: var(--text); }
.invite-box textarea { min-height: 88px; }
.modal.wide { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; overflow: auto; }
.prefs-top, .modal.wide .wizard-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.prefs-top h2, .modal.wide h2 { margin: 0; }
.prefs { display: grid; grid-template-columns: 220px 1fr; min-height: 460px; }
.prefs nav { border-right: 1px solid var(--border); padding: 8px; }
.prefs nav button { display: block; width: 100%; text-align: left; height: 36px; padding: 0 12px; border-radius: 6px; color: var(--text); }
.prefs nav button.on { background: #1264a3; color: #fff; }
#prefs-body { padding: 8px 22px 18px; max-height: 68vh; overflow: auto; }
#prefs-body h3 { margin: 8px 0; }
#prefs-body h4 { margin: 18px 0 6px; }
.mode-row, .theme-tools, .work-row, .invite-tabs, .invite-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status-row {
  display: grid;
  grid-template-columns: 52px minmax(180px, 1fr) 168px;
  gap: 8px;
  align-items: center;
  max-width: 640px;
  margin: 8px 0;
}
.status-row input, .status-row select { width: 100%; min-width: 0; margin: 0; }
.status-row input[data-status-emoji] { text-align: center; padding: 0 4px; }
.mode-row button, .invite-tabs button { height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 8px; }
.mode-row button.on, .invite-tabs button.on, .invite-chip.on { border-color: var(--accent); color: var(--accent); }
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.swatch { display: flex; justify-content: space-between; align-items: center; border-radius: 10px; padding: 8px 10px; background: var(--hover); }
.swatch span { display: flex; align-items: center; gap: 8px; }
.swatch input { width: 28px; height: 28px; padding: 0; border: 0; }
.admin-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.admin-row span { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.admin-app { display: grid; grid-template-columns: 220px 1fr; min-height: 100%; background: var(--main); color: var(--text); }
.admin-app aside { border-right: 1px solid var(--border); padding: 16px 10px; }
.admin-app aside button { display: block; width: 100%; text-align: left; height: 34px; padding: 0 10px; border-radius: 6px; }
.admin-app aside button.on { background: #e8f5ff; color: #1264a3; font-weight: 700; }
.admin-main { padding: 22px 28px 40px; overflow: auto; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-head h1, .admin-main h1 { margin: 0 0 8px; font-size: 24px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.admin-main input, .admin-table input { height: 36px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; background: var(--main); color: var(--text); }
.admin-table select { min-width: 180px; }
.metric-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 16px 0; }
.metric-row div { border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.metric-row b { display: block; font-size: 28px; }
.metric-row span, .menu-label { color: var(--muted); font-size: 13px; }
.menu-label { padding: 8px 12px 4px; font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bars .bar span { display: block; width: 100%; background: #611f69; border-radius: 3px 3px 0 0; min-height: 2px; }
.bars small { color: var(--muted); font-size: 10px; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 4px 12px; color: var(--sidebar-text); }
.ws-name { display: flex; align-items: center; gap: 6px; color: var(--sidebar-text); font-size: 18px; font-weight: 900; min-width: 0; }
.ws-name span { font-weight: 400; opacity: .8; }
.ws-row, .ws-add { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 12px; color: var(--text); }
.ws-row img { width: 36px; height: 36px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.ws-row small, .ws-add { color: var(--muted); font-size: 13px; }
.ws-row b { display: block; font-size: 15px; }
.ws-add { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; font-weight: 700; color: var(--text); }
.ws-add span { width: 36px; height: 36px; border-radius: 8px; background: var(--hover); display: grid; place-items: center; font-size: 22px; }
.invite-chip { height: 28px; padding: 0 10px; border-radius: 14px; background: #e8f5ff; color: #1264a3; }
.invite-tabs { border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.modal.wide .invite-tabs { padding: 0 18px; }
.modal.wide > label, .modal.wide > .hint, .modal.wide > .invite-box, .modal.wide > .invite-chips, .modal.wide > h4, .modal.wide > .people-pick, .modal.wide > .wizard-foot { margin-left: 18px; margin-right: 18px; }
.modal.wide > .wizard-foot { margin-bottom: 16px; }
