:root {
  --ink: #181a2a;
  --ink-soft: #555b6d;
  --muted: #8990a2;
  --line: #e3e6ee;
  --line-strong: #d4d8e3;
  --canvas: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f3f7;
  --rail: #17192a;
  --rail-soft: #262942;
  --primary: #6757e8;
  --primary-dark: #5444d1;
  --primary-soft: #eeebff;
  --green: #1eaf74;
  --red: #e54f63;
  --amber: #d99422;
  --shadow-sm: 0 6px 20px rgba(22, 25, 42, .08);
  --shadow-lg: 0 28px 80px rgba(22, 25, 42, .18);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body { color: var(--ink); background: var(--canvas); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { color: #fff; background: var(--primary); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: #c5c9d4; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 3px solid rgba(103, 87, 232, .24); outline-offset: 2px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; display: block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.primary-btn, .btn {
  min-height: 43px; padding: 0 18px; border: 0; border-radius: 11px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); font-size: .82rem; font-weight: 750;
  box-shadow: 0 8px 20px rgba(103, 87, 232, .22); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.primary-btn:hover, .btn:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 11px 25px rgba(103, 87, 232, .28); }
.secondary-btn { min-height: 43px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--ink); background: #fff; font-size: .82rem; font-weight: 700; }
.secondary-btn:hover { border-color: #bbb5ef; background: #faf9ff; }
.quiet-icon { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 9px; color: var(--ink-soft); background: transparent; text-decoration: none; }
.quiet-icon:hover { color: var(--ink); background: rgba(24, 26, 42, .06); }
.quiet-icon .icon { width: 18px; height: 18px; }
.eyebrow { color: var(--primary); font-size: .67rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }

.avatar {
  width: 38px; height: 38px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.8); border-radius: 12px; color: #fff; box-shadow: 0 3px 10px rgba(24,26,42,.13);
  font-size: .72rem; font-weight: 850; letter-spacing: .02em;
}
.avatar.sm { width: 39px; height: 39px; border-radius: 12px; }
.avatar.lg { width: 104px; height: 104px; border: 4px solid rgba(255,255,255,.18); border-radius: 30px; font-size: 1.55rem; }
.avatar-color-0 { background: linear-gradient(135deg, #6757e8, #9b66e9); }
.avatar-color-1 { background: linear-gradient(135deg, #2188d7, #665be7); }
.avatar-color-2 { background: linear-gradient(135deg, #16a17a, #1a91c3); }
.avatar-color-3 { background: linear-gradient(135deg, #e49231, #dc5668); }
.avatar-color-4 { background: linear-gradient(135deg, #d74d91, #7b5ae0); }
.avatar-color-5 { background: linear-gradient(135deg, #19a69c, #70a93e); }
.avatar-wrap { position: relative; flex: 0 0 auto; }
.dot { position: absolute; right: -2px; bottom: -1px; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: #adb2bf; }
.dot.on { background: var(--green); }

/* Workspace */
.app-page { height: 100vh; overflow: hidden; background: var(--surface); }
.workspace-shell { height: 100%; display: grid; grid-template-columns: 72px 306px minmax(0, 1fr); }
.workspace-rail { position: relative; z-index: 30; min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 15px 9px 13px; color: #fff; background: linear-gradient(180deg, #1b1d31, #121421); }
.rail-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #8376ff, #5a48df); box-shadow: 0 10px 25px rgba(83,69,212,.35); text-decoration: none; font-size: 1rem; font-weight: 900; }
.rail-main { width: 100%; display: grid; gap: 8px; margin-top: 31px; }
.rail-button { position: relative; width: 100%; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 13px; color: #969bb2; background: transparent; }
.rail-button > .icon { width: 20px; height: 20px; }
.rail-button small { font-size: .64rem; font-weight: 700; }
.rail-button:hover, .rail-button.active { color: #fff; background: rgba(255,255,255,.085); }
.rail-button.active::before { content: ""; position: absolute; left: -9px; width: 3px; height: 25px; border-radius: 0 4px 4px 0; background: #8a7dff; }
.rail-button b { position: absolute; top: 5px; right: 8px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--rail); border-radius: 99px; color: #fff; background: var(--red); font-size: .55rem; }
.rail-help { width: 34px; height: 34px; margin-top: auto; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; color: #aeb2c3; background: transparent; }
.rail-help .icon { width: 17px; height: 17px; }

.sidebar { position: relative; z-index: 20; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface-soft); }
.workspace-header { min-height: 78px; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.workspace-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.workspace-symbol { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #d9d6fa; border-radius: 11px; color: var(--primary); background: #fff; font-size: .66rem; font-weight: 900; }
.workspace-identity strong, .workspace-identity small { display: block; }
.workspace-identity strong { font-size: .9rem; }
.workspace-identity small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.sidebar-search { height: 40px; margin: 13px 14px 7px; padding: 0 9px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted); background: #fff; }
.sidebar-search:focus-within { border-color: #aaa1ef; box-shadow: 0 0 0 3px rgba(103,87,232,.1); }
.sidebar-search .icon { width: 16px; height: 16px; }
.sidebar-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .8rem; }
.sidebar-search input::placeholder { color: #9da3b1; }
.sidebar-search kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; color: #9aa0af; background: #f7f8fa; font-size: .55rem; }
.sidebar-scroll { min-height: 0; flex: 1; overflow: auto; padding: 5px 10px 20px; }
.sidebar-action { width: 100%; padding: 10px; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 11px; color: var(--ink); background: transparent; text-align: left; }
.sidebar-action:hover { border-color: var(--line); background: rgba(255,255,255,.7); }
.sidebar-action > span { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--primary); background: var(--primary-soft); font-size: 1rem; }
.sidebar-action strong, .sidebar-action small { display: block; }
.sidebar-action strong { font-size: .8rem; }
.sidebar-action small { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.nav-section { margin-top: 19px; }
.section-heading { height: 30px; padding: 0 7px; display: flex; align-items: center; justify-content: space-between; }
.section-heading h2 { color: #747b8d; font-size: .68rem; font-weight: 850; letter-spacing: .095em; text-transform: uppercase; }
.section-heading button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; color: #818799; background: transparent; }
.section-heading button .icon { width: 16px; height: 16px; }
.section-heading button:hover { color: var(--ink); background: #e2e5ec; }
.convo-list { list-style: none; }
.list-item { min-height: 54px; margin: 3px 0; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid transparent; border-radius: 12px; }
.list-item .left { min-width: 0; display: flex; align-items: center; gap: 9px; }
.list-item .meta { min-width: 0; }
.list-item .meta .name { overflow: hidden; color: #343849; font-size: .82rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.list-item .meta .sub { overflow: hidden; max-width: 190px; margin-top: 4px; color: #858c9d; font-size: .69rem; white-space: nowrap; text-overflow: ellipsis; }
.convo-item { cursor: pointer; transition: background .14s ease, border .14s ease, transform .14s ease; }
.convo-item:hover { border-color: #e0e2e9; background: rgba(255,255,255,.75); }
.convo-item.active { border-color: #d9d4ff; background: #fff; box-shadow: 0 5px 14px rgba(33,35,54,.055); }
.convo-item.active .name { color: var(--primary-dark); }
.hash { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #dcdee6; border-radius: 10px; color: #6e7485; background: #fff; font-size: .92rem; font-weight: 800; }
.empty { padding: 6px 9px; color: #969cab; font-size: .68rem; }
.badge { display: inline-flex; padding: 3px 7px; border-radius: 99px; font-size: .58rem; font-weight: 800; text-transform: capitalize; }
.badge.pending { color: #a86a0a; background: #fff3d9; }
.profile-bar { min-height: 70px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); background: rgba(255,255,255,.62); }
.me-row { min-width: 0; display: flex; align-items: center; gap: 9px; }
.who { overflow: hidden; max-width: 145px; font-size: .8rem; font-weight: 750; white-space: nowrap; text-overflow: ellipsis; }
.who small { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: .65rem; font-weight: 500; text-overflow: ellipsis; }
.profile-actions { display: flex; align-items: center; }
.sidebar-scrim, .utility-scrim { display: none; }

.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.mobile-bar { display: none; }
.placeholder { min-height: 0; flex: 1; padding: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.welcome-art { position: relative; width: 230px; height: 150px; margin-bottom: 23px; }
.welcome-logo { position: absolute; z-index: 3; left: 82px; top: 32px; width: 72px; height: 72px; display: grid; place-items: center; border: 6px solid #fff; border-radius: 23px; color: #fff; background: linear-gradient(145deg,#8376ff,#5846d8); box-shadow: 0 18px 40px rgba(87,70,216,.28); font-size: 1.3rem; font-weight: 900; transform: rotate(-4deg); }
.welcome-card { position: absolute; width: 105px; height: 72px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.welcome-card i { display: block; width: 21px; height: 21px; margin-bottom: 8px; border-radius: 7px; background: #e9e6ff; }
.welcome-card span { display: block; width: 70px; height: 5px; margin-top: 5px; border-radius: 5px; background: #e7e9ef; }
.card-one { left: 3px; top: 5px; transform: rotate(-8deg); }
.card-two { right: 2px; bottom: 2px; transform: rotate(8deg); }
.card-two i { background: #dcf5ea; }
.placeholder h1 { max-width: 620px; margin-top: 10px; font-size: clamp(1.8rem,3.2vw,2.65rem); line-height: 1.08; letter-spacing: -.055em; }
.placeholder > p { max-width: 535px; margin-top: 13px; color: var(--ink-soft); font-size: .88rem; line-height: 1.7; }
.welcome-actions { display: flex; gap: 9px; margin-top: 24px; }
.chat-area { min-height: 0; flex: 1; flex-direction: column; }
.chat-header { min-height: 76px; padding: 13px 23px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.peer { min-width: 0; display: flex; align-items: center; gap: 11px; }
.peer-copy { min-width: 0; }
.peer-copy > span { display: block; overflow: hidden; max-width: min(50vw,620px); font-size: 1rem; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.peer-copy small { display: block; overflow: hidden; max-width: min(50vw,620px); margin-top: 4px; color: var(--muted); font-size: .72rem; white-space: nowrap; text-overflow: ellipsis; }
.channel-avatar { border-color: #e6e1ff; color: var(--primary); background: var(--primary-soft); box-shadow: none; font-size: 1.03rem; }
.chat-actions { display: flex; align-items: center; gap: 7px; }
.header-action { min-width: 39px; height: 39px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-soft); background: #fff; font-size: .8rem; font-weight: 700; }
.header-action:hover { border-color: #cfc9f6; color: var(--primary-dark); background: #faf9ff; }
.header-action.call { color: #087a50; border-color: #cdeadd; background: #f4fcf8; }
.header-action.call > span { font-size: .72rem; }
.primary-small { height: 36px; padding: 0 12px; border: 0; border-radius: 9px; color: #fff; background: var(--primary); font-size: .69rem; font-weight: 750; }
.member-count { color: var(--muted); font-size: .64rem; }

.messages { min-height: 0; flex: 1; overflow: auto; padding: 30px max(24px,calc((100% - 960px)/2)) 35px; }
.conversation-start { padding: 55px 12px 28px; }
.conversation-start-icon { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid #ddd9fb; border-radius: 20px; color: var(--primary); background: var(--primary-soft); font-size: 1.3rem; font-weight: 900; }
.conversation-start h2 { margin-top: 15px; font-size: 1.35rem; letter-spacing: -.035em; }
.conversation-start p { margin-top: 7px; color: var(--muted); font-size: .76rem; }
.date-divider { position: relative; height: 30px; margin: 20px 0 14px; display: flex; align-items: center; justify-content: center; }
.date-divider::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.date-divider span { position: relative; z-index: 1; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: #777e8e; background: #fff; font-size: .6rem; font-weight: 700; }
.message-row { position: relative; display: grid; grid-template-columns: 41px minmax(0,1fr); gap: 10px; padding: 7px 11px; border-radius: 10px; animation: message-in .16s ease both; }
.message-row:hover { background: #f7f8fb; }
.message-row.mine:hover { background: #faf9ff; }
.message-row.compact { min-height: 29px; padding-block: 3px; }
.message-content { min-width: 0; padding-top: 1px; }
.message-meta { display: flex; align-items: baseline; gap: 8px; }
.message-meta strong { font-size: .84rem; }
.message-meta time { color: #969cab; font-size: .65rem; }
.message-text { margin-top: 4px; color: #343949; font-size: .91rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-time-hover { visibility: hidden; padding-top: 4px; color: #a0a5b1; font-size: .55rem; text-align: right; }
.message-row.compact:hover .message-time-hover { visibility: visible; }
.channel-join-empty { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: .8rem; }
.composer { padding: 11px max(30px,calc((100% - 930px)/2)) 19px; background: linear-gradient(180deg,rgba(255,255,255,.78),#fff); }
.composer-box { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 15px; background: #fff; box-shadow: 0 9px 24px rgba(25,28,45,.07); }
.composer-box:focus-within { border-color: #a89fec; box-shadow: 0 0 0 3px rgba(103,87,232,.09),0 9px 24px rgba(25,28,45,.07); }
.composer textarea { width: 100%; min-height: 48px; max-height: 140px; padding: 14px 15px 5px; display: block; resize: none; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .9rem; line-height: 1.5; }
.composer textarea::placeholder { color: #9ca2af; }
.composer-toolbar { min-height: 40px; padding: 4px 7px 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer-tools, .composer-send { display: flex; align-items: center; gap: 7px; }
.composer-tools button { min-width: 29px; height: 29px; padding: 0 7px; border: 0; border-radius: 8px; color: #757c8d; background: transparent; font-size: .72rem; font-weight: 750; }
.composer-tools button .icon { width: 16px; height: 16px; }
.composer-tools button:hover { background: var(--surface-soft); }
.composer-hint { color: #979dab; font-size: .63rem; }
.composer-send > span { color: #a2a7b4; font-size: .55rem; }
.composer-send button { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 9px; color: #fff; background: var(--primary); font-size: 1rem; font-weight: 800; }
.composer-send button .icon { width: 15px; height: 15px; }

/* Private people search */
.people-panel { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: min(390px,100vw); display: flex; flex-direction: column; border-left: 1px solid var(--line); background: #fff; box-shadow: -24px 0 65px rgba(24,27,44,.16); transform: translateX(102%); transition: transform .22s ease; }
.people-panel-open .people-panel { transform: translateX(0); }
.people-panel-open .utility-scrim { position: fixed; inset: 0; z-index: 55; display: block; border: 0; background: rgba(20,22,37,.24); backdrop-filter: blur(2px); }
.panel-header { min-height: 81px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin-top: 5px; font-size: 1.15rem; letter-spacing: -.025em; }
.panel-tabs { height: 50px; padding: 7px 18px 0; display: flex; gap: 18px; border-bottom: 1px solid var(--line); }
.panel-tabs button { position: relative; border: 0; color: var(--muted); background: transparent; font-size: .8rem; font-weight: 750; }
.panel-tabs button.active { color: var(--ink); }
.panel-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.panel-view { min-height: 0; flex: 1; overflow: auto; display: none; padding: 20px; }
.panel-view.active { display: block; }
.panel-intro strong, .panel-intro span { display: block; }
.panel-intro strong { font-size: .88rem; }
.panel-intro span { margin-top: 6px; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.people-search { height: 43px; margin-top: 16px; padding: 0 6px 0 11px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--muted); }
.people-search:focus-within { border-color: #a89fec; box-shadow: 0 0 0 3px rgba(103,87,232,.09); }
.people-search .icon { width: 17px; height: 17px; }
.people-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .8rem; }
.people-search button { height: 31px; padding: 0 11px; border: 0; border-radius: 8px; color: #fff; background: var(--primary); font-size: .68rem; font-weight: 750; }
.people-search-empty { padding: 70px 25px 30px; color: var(--muted); text-align: center; }
.people-search-empty > span { width: 48px; height: 48px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 15px; color: var(--primary); background: var(--primary-soft); font-size: 1.05rem; }
.people-search-empty strong, .people-search-empty p { display: block; }
.people-search-empty strong { color: var(--ink); font-size: .82rem; }
.people-search-empty p { margin-top: 6px; font-size: .7rem; line-height: 1.5; }
.search-spinner { border: 2px solid #ddd9fb; border-top-color: var(--primary); border-radius: 50% !important; background: transparent !important; animation: spin .7s linear infinite; }
.people-list, .invite-list { margin-top: 15px; list-style: none; }
.people-list.has-results { overflow: hidden; padding: 5px 10px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 15px 35px rgba(24,26,42,.11); }
.person-card, .invite-card { padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; border-bottom: 1px solid #edf0f4; }
.person-main, .invite-person { min-width: 0; display: flex; align-items: center; gap: 10px; }
.person-copy { min-width: 0; }
.person-copy strong, .person-copy > span, .invite-person strong, .invite-person span { display: block; }
.person-copy strong, .invite-person strong { overflow: hidden; font-size: .8rem; white-space: nowrap; text-overflow: ellipsis; }
.person-copy > span, .invite-person span { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.person-copy .person-status { margin-top: 5px; }
.presence { width: 6px; height: 6px; margin-right: 5px; display: inline-block; border-radius: 50%; background: #adb2bf; }
.presence.online { background: var(--green); }
.you { margin-left: 4px; padding: 2px 5px; border-radius: 5px; color: var(--primary); background: var(--primary-soft); font-size: .52rem; font-weight: 750; }
.person-actions, .invite-actions { display: flex; align-items: center; gap: 5px; }
.person-icon { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); background: #fff; }
.person-icon .icon { width: 15px; height: 15px; margin: auto; }
.person-button { height: 32px; padding: 0 11px; border: 0; border-radius: 8px; color: #fff; background: var(--primary); font-size: .68rem; font-weight: 750; }
.person-button.secondary { border: 1px solid var(--line-strong); color: var(--ink-soft); background: #fff; }
.panel-section + .panel-section { margin-top: 30px; }
.panel-section-title { display: flex; align-items: baseline; justify-content: space-between; }
.panel-section-title h3 { font-size: .76rem; }
.panel-section-title span { color: var(--muted); font-size: .57rem; }
.panel-empty { padding: 28px 0; color: var(--muted); font-size: .63rem; text-align: center; }

/* Dialog and call experience */
.modal { width: min(455px,calc(100vw - 28px)); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 21px; color: var(--ink); background: #fff; box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(20,22,37,.38); backdrop-filter: blur(6px); }
.modal form { padding: 29px; }
.modal-symbol { width: 46px; height: 46px; margin-bottom: 18px; display: grid; place-items: center; border-radius: 14px; color: var(--primary); background: var(--primary-soft); font-size: 1.2rem; font-weight: 900; }
.modal h2 { margin-top: 7px; font-size: 1.28rem; letter-spacing: -.035em; }
.modal p { margin: 8px 0 22px; color: var(--ink-soft); font-size: .75rem; line-height: 1.55; }
.modal label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: .68rem; font-weight: 700; }
.channel-input { height: 46px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 11px; }
.channel-input:focus-within { border-color: #a89fec; box-shadow: 0 0 0 3px rgba(103,87,232,.09); }
.channel-input span { color: var(--muted); font-weight: 850; }
.channel-input input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 23px; }
.call-overlay { position: fixed; inset: 0; z-index: 100; padding: 20px; display: flex; align-items: center; justify-content: center; color: #fff; background: radial-gradient(circle at 50% 30%,rgba(103,87,232,.22),transparent 35%),rgba(8,10,18,.92); backdrop-filter: blur(16px); }
.call-stage { min-width: 380px; padding: 42px; display: flex; flex-direction: column; align-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 28px; background: linear-gradient(145deg,rgba(40,43,65,.88),rgba(18,20,32,.92)); box-shadow: 0 35px 90px rgba(0,0,0,.4); text-align: center; }
.call-security { margin-bottom: 25px; padding: 6px 10px; border: 1px solid rgba(80,220,160,.2); border-radius: 99px; color: #7ce4b4; background: rgba(42,193,124,.08); font-size: .58rem; font-weight: 750; }
.call-person { display: flex; flex-direction: column; align-items: center; }
.call-person h2, .incoming-call h2 { margin-top: 17px; font-size: 1.25rem; }
.call-person p, .incoming-call p { margin-top: 6px; color: #9ba0b4; font-size: .7rem; }
.call-controls { display: flex; align-items: center; gap: 13px; margin-top: 29px; }
.call-control { width: 67px; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid rgba(255,255,255,.12); border-radius: 17px; color: #e5e7ef; background: rgba(255,255,255,.07); }
.call-control span { font-size: 1.05rem; }
.call-control .icon { width: 21px; height: 21px; }
.call-control small { font-size: .56rem; font-weight: 700; }
.call-control:hover { background: rgba(255,255,255,.12); }
.call-control.muted { color: #ffb0ba; border-color: rgba(229,79,99,.3); background: rgba(229,79,99,.12); }
.call-control.sharing { color: #87e9ba; border-color: rgba(30,175,116,.3); background: rgba(30,175,116,.12); }
.call-control.end { border: 0; color: #fff; background: var(--red); }
.call-control.accept { border: 0; color: #fff; background: var(--green); }
.screen-wrap { position: relative; overflow: hidden; width: min(92vw,1100px); height: min(70vh,700px); margin-bottom: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: #05060a; }
.screen-wrap video { width: 100%; height: 100%; object-fit: contain; }
.screen-wrap:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; }
.fullscreen-button { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: #fff; background: rgba(0,0,0,.52); }
.call-stage.has-screen { width: min(96vw,1160px); padding: 15px; }
.call-stage.has-screen .call-security, .call-stage.has-screen .avatar.lg { display: none; }
.call-stage.has-screen .call-controls { margin-top: 12px; }
.pulse { animation: pulse 1.8s ease infinite; }
.toast { position: fixed; z-index: 150; right: 22px; bottom: 22px; max-width: min(370px,calc(100vw - 44px)); padding: 12px 15px; border: 1px solid #dfe2ea; border-radius: 11px; color: var(--ink); background: #fff; box-shadow: var(--shadow-lg); font-size: .72rem; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .18s ease,transform .18s ease; }
.toast.show { opacity: 1; transform: none; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }

/* Authentication */
.auth-page { background: #f5f6fa; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(450px,1.05fr) minmax(430px,.95fr); }
.auth-story { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; padding: 42px 52px; display: flex; flex-direction: column; color: #fff; background: radial-gradient(circle at 15% 90%,rgba(103,87,232,.55),transparent 35%),radial-gradient(circle at 90% 10%,rgba(57,187,199,.2),transparent 28%),#16182b; }
.auth-story::after { content:""; position:absolute; inset:0; z-index:-1; opacity:.13; background-image:linear-gradient(rgba(255,255,255,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.08) 1px,transparent 1px); background-size:44px 44px; mask-image:linear-gradient(to bottom,#000,transparent 90%); }
.auth-brand, .auth-mobile-brand { width:max-content; display:inline-flex; align-items:center; gap:10px; color:inherit; text-decoration:none; font-size:1rem; font-weight:850; }
.auth-brand span, .auth-mobile-brand span { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; color:#fff; background:linear-gradient(145deg,#8376ff,#5846d8); box-shadow:0 9px 24px rgba(0,0,0,.16); }
.story-copy { max-width:610px; margin:auto 0; padding:60px 0 90px; }
.story-copy .eyebrow { color:#a99fff; }
.story-copy h1 { max-width:590px; margin-top:18px; font-size:clamp(2.8rem,5vw,5.25rem); line-height:.98; letter-spacing:-.067em; }
.story-copy > p { max-width:510px; margin-top:25px; color:rgba(237,239,248,.68); font-size:.98rem; line-height:1.7; }
.story-proof { display:flex; align-items:center; gap:14px; margin-top:35px; color:#b2b6c8; font-size:.72rem; font-weight:650; }
.avatar-stack { display:flex; }
.avatar-stack i { width:32px; height:32px; margin-left:-7px; display:grid; place-items:center; border:2px solid #1b1d31; border-radius:50%; color:#fff; background:linear-gradient(135deg,#897cff,#5c48dd); font-size:.56rem; font-style:normal; font-weight:800; }
.avatar-stack i:first-child { margin-left:0; }.avatar-stack i:nth-child(2){background:linear-gradient(135deg,#19a69c,#2e76c8)}.avatar-stack i:nth-child(3){background:linear-gradient(135deg,#e68c38,#d54e83)}.avatar-stack i:last-child{background:#343750}
.story-orbit { position:absolute; z-index:-1; border:1px solid rgba(255,255,255,.1); border-radius:50%; }.orbit-one{width:420px;height:420px;right:-150px;bottom:-110px}.orbit-two{width:260px;height:260px;right:-68px;bottom:-22px}
.auth-panel { min-height:100vh; padding:38px; display:grid; place-items:center; background:#fff; }
.auth-card { width:min(100%,430px); }.auth-mobile-brand{display:none;margin-bottom:46px;color:var(--ink)}
.auth-card h2 { margin-top:12px; font-size:1.72rem; letter-spacing:-.045em; }.auth-card .tagline{margin:9px 0 28px;color:var(--muted);font-size:.8rem}
.tabs { display:flex; gap:5px; margin-bottom:25px; padding:4px; border:1px solid var(--line); border-radius:11px; background:#f7f8fa; }
.tabs button { flex:1; padding:9px; border:0; border-radius:8px; color:var(--muted); background:transparent; font-size:.73rem; font-weight:750; }.tabs button.active{color:var(--ink);background:#fff;box-shadow:0 4px 13px rgba(24,26,42,.08)}
.field { margin-bottom:16px; }.field label,.field-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px;color:var(--ink-soft);font-size:.7rem;font-weight:700}.field-label label{margin:0}.field-label span{color:#9ca2af;font-size:.59rem;font-weight:550}
.field > input,.password-wrap{width:100%;height:48px;border:1px solid var(--line-strong);border-radius:11px;background:#fff;transition:border .15s ease,box-shadow .15s ease}.field > input{padding:0 14px;color:var(--ink);outline:0}.field > input:focus,.password-wrap:focus-within{border-color:#a89fec;box-shadow:0 0 0 3px rgba(103,87,232,.09)}.field input::placeholder{color:#a1a6b2}
.password-wrap{display:flex;align-items:center;padding:0 10px 0 14px}.password-wrap input{min-width:0;flex:1;border:0;outline:0;color:var(--ink);background:transparent}.password-wrap button{border:0;color:var(--muted);background:transparent;font-size:.65rem;font-weight:700}
.auth-submit{width:100%;margin-top:6px;display:flex;align-items:center;justify-content:space-between;padding-inline:17px}.auth-submit b{font-size:1.05rem}
.msg{min-height:20px;margin-top:14px;color:var(--muted);font-size:.7rem;line-height:1.45;text-align:center}.msg.error{color:var(--red)}.msg.ok{color:var(--green)}.security-note{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:20px;color:#a0a5b1;font-size:.59rem}.security-note span{color:var(--green);font-size:.5rem}

/* Administration */
.admin-page { min-height:100vh; background:#f6f7fa; }.admin-global{height:66px;padding:0 max(24px,calc((100% - 1120px)/2));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:rgba(255,255,255,.9);backdrop-filter:blur(14px)}
.admin-nav{display:flex;align-items:center;gap:17px}.admin-nav a,.admin-nav button{border:0;color:var(--muted);background:transparent;text-decoration:none;font-size:.7rem;font-weight:700}.admin-nav a:hover,.admin-nav button:hover{color:var(--ink)}
.admin-wrap{width:min(1120px,calc(100% - 40px));margin:0 auto;padding:55px 0 80px}.admin-hero{display:flex;align-items:center;justify-content:space-between;gap:25px}.admin-hero h1{margin-top:9px;font-size:2rem;letter-spacing:-.05em}.admin-hero p{margin-top:8px;color:var(--muted);font-size:.78rem}
.secure-pill{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid #ccebdd;border-radius:99px;color:#15845a;background:#f4fcf8;font-size:.64rem;font-weight:750}.secure-pill span{font-size:.5rem}
.admin-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-top:31px}.admin-stats article{padding:19px 21px;border:1px solid var(--line);border-radius:14px;background:#fff}.admin-stats span{display:block;color:var(--muted);font-size:.67rem}.admin-stats strong{display:block;margin-top:8px;font-size:1.42rem;letter-spacing:-.04em}
.admin-section{margin-top:35px}.admin-section-title{margin-bottom:13px;display:flex;align-items:center;justify-content:space-between}.admin-section-title h2{font-size:.95rem}.admin-section-title p{margin-top:4px;color:var(--muted);font-size:.65rem}.status-dot{width:9px;height:9px;border-radius:50%}.status-dot.amber{background:#e6a537;box-shadow:0 0 12px rgba(230,165,55,.35)}
.table-shell{overflow:auto;border:1px solid var(--line);border-radius:14px;background:#fff}.admin-wrap table{width:100%;border-collapse:collapse}.admin-wrap th,.admin-wrap td{padding:13px 17px;border-bottom:1px solid #eceef3;text-align:left;white-space:nowrap}.admin-wrap tr:last-child td{border-bottom:0}.admin-wrap th{color:#8a90a0;background:#fafbfc;font-size:.6rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.admin-wrap td{color:var(--ink-soft);font-size:.71rem}.admin-wrap tbody tr:hover{background:#fafbfc}
.table-person{display:flex;align-items:center;gap:10px}.table-person>span{width:30px;height:30px;display:grid;place-items:center;border-radius:8px;color:var(--primary);background:var(--primary-soft);font-size:.63rem;font-weight:800}.table-person strong{color:var(--ink);font-size:.72rem}.row-actions{text-align:right!important}.row-actions .mini-btn+.mini-btn{margin-left:5px}.mini-btn{height:30px;padding:0 9px;border:1px solid transparent;border-radius:8px;font-size:.59rem;font-weight:750}.mini-btn.accept{color:#137a53;border-color:#cbeadb;background:#f2fbf7}.mini-btn.decline{color:#c63f51;border-color:#f2d1d6;background:#fff7f8}.badge.approved{color:#147b53;background:#eaf8f1}.badge.rejected{color:#be3c4e;background:#fdecef}.role-admin{color:var(--primary);font-weight:700}.admin-empty{padding:25px;color:var(--muted);font-size:.7rem;text-align:center}.msg.floating{position:fixed;right:24px;bottom:24px;min-height:0;margin:0;padding:11px 14px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:#fff;box-shadow:var(--shadow-lg)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

@keyframes message-in { from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none} }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(123,108,255,.35)}50%{box-shadow:0 0 0 22px rgba(123,108,255,0)} }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1050px) {
  .workspace-shell { grid-template-columns: 64px 280px minmax(0,1fr); }
  .workspace-rail { padding-inline: 7px; }
  .rail-button.active::before { left: -7px; }
  .composer-hint { display: none; }
}
@media (max-width: 920px) {
  .auth-shell{grid-template-columns:1fr}.auth-story{display:none}.auth-panel{padding:28px}.auth-mobile-brand{display:inline-flex}
}
@media (max-width: 760px) {
  .workspace-shell { display: block; }
  .workspace-rail { display: none; }
  .sidebar { position:fixed;z-index:50;top:0;bottom:0;left:0;width:min(306px,88vw);box-shadow:24px 0 60px rgba(24,27,44,.2);transform:translateX(-102%);transition:transform .2s ease; }
  .sidebar-open .sidebar { transform:translateX(0); }
  .sidebar-open .sidebar-scrim { position:fixed;inset:0;z-index:45;display:block;border:0;background:rgba(20,22,37,.25);backdrop-filter:blur(2px); }
  .main { height:100vh; }
  .mobile-bar { min-height:52px;padding:7px 10px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#fff; }
  .mobile-bar > span { display:flex;align-items:center;gap:7px;font-size:.73rem;font-weight:750; }.mobile-bar b{width:26px;height:26px;display:grid;place-items:center;border-radius:8px;color:#fff;background:var(--primary);font-size:.65rem}
  .chat-header{min-height:65px;padding:10px 12px}.peer-copy>span,.peer-copy small{max-width:45vw}.header-action>span,.member-count{display:none!important}.messages{padding:18px 7px 25px}.message-row{padding-inline:7px}.composer{padding:8px 9px 11px}.composer-send>span{display:none}.placeholder{padding:26px 20px}.welcome-actions{flex-direction:column;width:min(280px,100%)}.welcome-actions button{width:100%}
  .admin-wrap{width:min(100% - 24px,1120px);padding-top:35px}.admin-hero{align-items:flex-start}.admin-hero .secure-pill{display:none}.admin-stats{grid-template-columns:1fr}.admin-global{padding:0 14px}.admin-nav a{display:none}
}
@media (max-width: 460px) {
  .auth-panel{padding:22px;place-items:start center}.auth-card{padding-top:18px}.auth-mobile-brand{margin-bottom:50px}.auth-card h2{font-size:1.5rem}
  .call-stage{min-width:0;width:100%;padding:30px 18px}.call-controls{gap:8px}.call-control{width:62px}.modal form{padding:22px}.modal-actions{flex-direction:column-reverse}.modal-actions button{width:100%}.people-panel{width:100%}
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important} }

/* 2026 workspace refresh */
.app-page {
  --topbar: #101827;
  --topbar-soft: #182236;
  --workspace-bg: #f5f7fb;
  --sidebar-bg: #f8fafc;
  --accent: #6267f2;
  --accent-dark: #4e53d9;
  --accent-soft: #eef0ff;
  background: var(--workspace-bg);
}

.workspace-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  grid-template-rows: 68px minmax(0, 1fr);
}

.app-topbar {
  position: relative;
  z-index: 70;
  grid-column: 1 / -1;
  grid-row: 1;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 280px minmax(280px, 680px) minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 28% -80%, rgba(105, 114, 255, .5), transparent 42%),
    linear-gradient(110deg, #0f1726, #131d31 70%, #101827);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 7px 24px rgba(15, 23, 39, .14);
}

.topbar-brand { min-width: 0; display: flex; align-items: center; gap: 11px; }
.topbar-brand > div:last-child { min-width: 0; }
.topbar-brand strong, .topbar-brand span { display: block; }
.topbar-brand strong { font-size: .92rem; font-weight: 820; letter-spacing: -.015em; }
.topbar-brand span { margin-top: 2px; color: #99a5bc; font-size: .62rem; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.22); border-radius: 12px; color: #fff;
  background: linear-gradient(145deg, #777dff, #5055df); text-decoration: none;
  box-shadow: 0 8px 22px rgba(61, 67, 194, .38);
}
.brand-mark .icon { width: 21px; height: 21px; stroke-width: 2.2; }
.mobile-menu-trigger { display: none; color: #d9deea; }
.mobile-menu-trigger:hover { color: #fff; background: rgba(255,255,255,.09); }

.global-search { position: relative; width: 100%; max-width: 680px; justify-self: center; }
.global-search > .icon {
  position: absolute; z-index: 2; left: 14px; top: 50%; width: 17px; height: 17px;
  color: #9ba7bd; pointer-events: none; transform: translateY(-50%);
}
.global-search > input {
  width: 100%; height: 40px; padding: 0 58px 0 42px; border: 1px solid rgba(255,255,255,.14);
  border-radius: 11px; outline: 0; color: #fff; background: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035); font-size: .78rem;
  transition: border .16s ease, background .16s ease, box-shadow .16s ease;
}
.global-search > input::placeholder { color: #a7b0c2; }
.global-search > input:focus {
  border-color: rgba(151,157,255,.78); background: rgba(255,255,255,.12);
  box-shadow: 0 0 0 3px rgba(105,111,244,.2);
}
.global-search > kbd {
  position: absolute; right: 9px; top: 50%; padding: 3px 7px; border: 1px solid rgba(255,255,255,.13);
  border-radius: 6px; color: #98a4ba; background: rgba(0,0,0,.16); font-size: .55rem; transform: translateY(-50%);
}
.global-search-popover {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); overflow: hidden;
  border: 1px solid #dfe3ec; border-radius: 15px; color: var(--ink); background: #fff;
  box-shadow: 0 24px 70px rgba(8,15,30,.27);
}
.search-popover-label {
  padding: 12px 14px 7px; color: #8a91a2; font-size: .59rem; font-weight: 850;
  letter-spacing: .1em; text-transform: uppercase;
}
.global-search-state { padding: 14px 15px 18px; color: #777f91; font-size: .72rem; }
.global-search-popover ul { max-height: 330px; overflow: auto; padding: 4px 7px 9px; list-style: none; }
.global-search-popover li + li { margin-top: 2px; }
.global-search-popover li > button {
  width: 100%; padding: 9px; display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 11px; color: var(--ink); background: transparent; text-align: left;
}
.global-search-popover li > button:hover, .global-search-popover li > button:focus-visible { background: #f2f4ff; }
.global-search-popover .avatar { width: 36px; height: 36px; border-radius: 11px; }
.global-person-copy { min-width: 0; flex: 1; }
.global-person-copy strong, .global-person-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.global-person-copy strong { font-size: .77rem; }
.global-person-copy small { margin-top: 3px; color: #858c9d; font-size: .64rem; }
.global-search-popover em {
  padding: 4px 8px; border-radius: 99px; color: var(--accent-dark); background: var(--accent-soft);
  font-size: .58rem; font-style: normal; font-weight: 800;
}

.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 7px; }
.connection-status {
  height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 99px; color: #b8c1d1;
  background: rgba(255,255,255,.055); font-size: .62rem; font-weight: 720;
}
.connection-status i { width: 7px; height: 7px; border-radius: 50%; background: #e5a936; box-shadow: 0 0 0 3px rgba(229,169,54,.13); }
.connection-status.online { color: #c6f4df; }
.connection-status.online i { background: #4bd397; box-shadow: 0 0 0 3px rgba(75,211,151,.13); }
.connection-status.reconnecting { color: #ffe1a6; }
.topbar-icon {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 10px; color: #c0c8d7; background: transparent;
}
.topbar-icon:hover { border-color: rgba(255,255,255,.1); color: #fff; background: rgba(255,255,255,.08); }
.topbar-icon .icon { width: 18px; height: 18px; }
.topbar-icon b {
  position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center; border: 2px solid var(--topbar); border-radius: 99px;
  color: #fff; background: #ef5267; font-size: .5rem;
}

.sidebar {
  z-index: 30; grid-column: 1; grid-row: 2; border-right: 1px solid #e1e5ee;
  background: var(--sidebar-bg); box-shadow: 8px 0 24px rgba(22,30,46,.025);
}
.workspace-header { min-height: 74px; padding: 15px 17px; background: #fff; }
.workspace-identity strong { font-size: .92rem; letter-spacing: -.015em; }
.workspace-identity small { color: #9299aa; font-size: .64rem; }
.workspace-privacy {
  padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #dfe4ec;
  border-radius: 99px; color: #697184; background: #f9fafc; font-size: .55rem; font-weight: 750;
}
.workspace-privacy .icon { width: 11px; height: 11px; }
.sidebar-search {
  height: 39px; margin: 13px 14px 9px; border-color: #dfe3eb; border-radius: 10px;
  background: #fff; box-shadow: 0 2px 8px rgba(22,30,46,.025);
}
.sidebar-scroll { padding: 4px 10px 18px; }
.sidebar-action {
  min-height: 58px; padding: 9px 10px; border-color: #e3e6ef; background: #fff;
  box-shadow: 0 5px 16px rgba(25,32,48,.045);
}
.sidebar-action:hover { border-color: #cfd3ff; background: #f9f9ff; transform: translateY(-1px); }
.sidebar-action > span { color: #fff; background: linear-gradient(145deg, #7479ff, #575cdf); }
.sidebar-action .action-arrow { width: 15px; height: 15px; margin-left: auto; color: #8f96a6; }
.nav-section { margin-top: 18px; }
.section-heading h2 { color: #82899a; font-size: .62rem; }
.list-item { min-height: 51px; border-radius: 10px; }
.convo-item:hover { border-color: #e0e4ec; background: #fff; }
.convo-item.active { border-color: #d7d9ff; background: #eeefff; box-shadow: none; }
.convo-item.active .name { color: #3f43bc; }
.hash { width: 34px; height: 34px; border-color: #e0e4ec; border-radius: 9px; background: #fff; }
.profile-bar { min-height: 68px; background: #fff; }

.main { grid-column: 2; grid-row: 2; background: #fff; }
.placeholder {
  padding: clamp(24px, 4vw, 56px); align-items: stretch; justify-content: flex-start;
  overflow: auto; text-align: left;
  background:
    radial-gradient(circle at 90% 0, rgba(103,108,242,.08), transparent 28%),
    linear-gradient(180deg, #f7f8fc, #fff 38%);
}
.home-dashboard { width: min(1050px, 100%); margin: auto; }
.home-hero {
  min-height: 275px; padding: clamp(28px, 4vw, 48px); display: flex; align-items: center;
  justify-content: space-between; gap: 40px; overflow: hidden; border: 1px solid rgba(255,255,255,.12);
  border-radius: 25px; color: #fff;
  background:
    radial-gradient(circle at 82% 15%, rgba(122,130,255,.58), transparent 29%),
    linear-gradient(125deg, #111b2d, #1c2944 62%, #303c69);
  box-shadow: 0 24px 65px rgba(24,35,59,.19);
}
.hero-copy { position: relative; z-index: 2; max-width: 620px; }
.home-kicker {
  display: inline-flex; align-items: center; gap: 7px; color: #bec6ff;
  font-size: .67rem; font-weight: 820; letter-spacing: .09em; text-transform: uppercase;
}
.home-kicker .icon { width: 15px; height: 15px; }
.home-hero h1 { margin-top: 15px; font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.02; letter-spacing: -.06em; }
.home-hero p { max-width: 600px; margin-top: 15px; color: #bdc6d7; font-size: .9rem; line-height: 1.65; }
.home-hero .welcome-actions { margin-top: 25px; }
.home-hero .primary-btn, .home-hero .secondary-btn { display: inline-flex; align-items: center; gap: 8px; }
.home-hero .primary-btn { color: #172039; background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.13); }
.home-hero .secondary-btn { border-color: rgba(255,255,255,.18); color: #fff; background: rgba(255,255,255,.08); }
.home-hero .secondary-btn:hover { background: rgba(255,255,255,.14); }
.home-hero .icon { width: 16px; height: 16px; }
.hero-mark {
  position: relative; width: 190px; height: 190px; display: grid; place-items: center; flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.12); border-radius: 50%; color: #fff;
  background: rgba(255,255,255,.055); box-shadow: inset 0 0 60px rgba(255,255,255,.04);
}
.hero-mark > .icon { width: 75px; height: 75px; stroke-width: 1.25; }
.hero-mark i { position: absolute; inset: 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.hero-mark i:nth-of-type(2) { inset: -22px; opacity: .7; }
.hero-mark i:nth-of-type(3) { inset: -58px; opacity: .35; }
.home-grid { margin-top: 18px; display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 15px; }
.home-card {
  min-width: 0; min-height: 145px; padding: 21px; border: 1px solid #e1e5ed; border-radius: 18px;
  color: var(--ink); background: #fff; box-shadow: 0 10px 30px rgba(25,33,50,.055);
}
button.home-card { display: flex; align-items: center; gap: 13px; text-align: left; }
button.home-card:hover { border-color: #cfd2ff; background: #fafaff; transform: translateY(-2px); }
.home-card-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; }
.home-card-icon .icon { width: 20px; height: 20px; }
.home-card-icon.violet { color: #5358d6; background: #eceeff; }
.home-card-icon.mint { color: #108766; background: #e4f7f0; }
.home-card-icon.blue { color: #2376b9; background: #e8f4ff; }
.home-card strong, .home-card small { display: block; }
.home-card strong { font-size: .82rem; letter-spacing: -.01em; }
.home-card small { margin-top: 6px; color: #7f8798; font-size: .67rem; line-height: 1.5; }
.home-card .card-arrow { width: 17px; height: 17px; margin-left: auto; color: #9aa1b0; transform: rotate(45deg); }
.home-card-heading { display: flex; align-items: center; gap: 11px; }
.snapshot-stats { margin-top: 19px; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.snapshot-stats div { padding-right: 8px; border-right: 1px solid #e8eaf0; }
.snapshot-stats div:last-child { border: 0; }
.snapshot-stats b, .snapshot-stats span { display: block; }
.snapshot-stats b { font-size: 1.12rem; letter-spacing: -.04em; }
.snapshot-stats span { margin-top: 4px; color: #9097a6; font-size: .56rem; }
.security-card { display: flex; align-items: center; gap: 13px; }

.chat-header {
  min-height: 76px; padding: 12px 24px; border-bottom-color: #e5e8ef;
  background: rgba(255,255,255,.94); box-shadow: 0 5px 18px rgba(27,34,49,.025);
}
.peer-copy > .peer-title { display: flex; align-items: center; gap: 8px; }
.peer-title > span { overflow: hidden; max-width: min(48vw,620px); font-size: 1rem; font-weight: 820; white-space: nowrap; text-overflow: ellipsis; }
.peer-title > b { padding: 3px 7px; border-radius: 99px; color: #5e64cd; background: #eef0ff; font-size: .52rem; font-weight: 800; }
.peer-copy small { color: #858d9e; }
.header-action { border-color: #e0e4eb; border-radius: 10px; }
.header-action.call { color: #fff; border-color: #16875f; background: #16875f; }
.header-action.call:hover { color: #fff; border-color: #116f4e; background: #116f4e; }
.messages { padding-top: 24px; background: #fff; }
.message-row { border-radius: 9px; }
.message-row:hover { background: #f6f7fa; }
.message-text { color: #303646; }
.composer { padding-bottom: 22px; background: linear-gradient(180deg,rgba(255,255,255,.7),#fff 25%); }
.composer-box { border-color: #d9dee7; border-radius: 14px; box-shadow: 0 10px 28px rgba(20,28,44,.075); }
.composer-box:focus-within { border-color: #969bff; box-shadow: 0 0 0 3px rgba(98,103,242,.11),0 10px 28px rgba(20,28,44,.075); }
.composer textarea { min-height: 52px; padding: 15px 16px 5px; font-size: .91rem; }
.composer-security { display: inline-flex; align-items: center; gap: 5px; color: #7f8796; font-size: .61rem; }
.composer-security .icon { width: 12px; height: 12px; }
.composer-send button {
  width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg,var(--accent),var(--accent-dark));
  box-shadow: 0 6px 14px rgba(83,88,210,.25);
}
.composer-send button:hover { transform: translateY(-1px); }

.people-panel { top: 68px; width: min(410px,100vw); border-left-color: #e0e4ec; border-radius: 18px 0 0 0; }
.people-panel-open .utility-scrim { top: 68px; }
.panel-header { min-height: 76px; }
.panel-tabs { padding-inline: 20px; }
.person-card { border-radius: 13px; background: #fafbfc; }
.person-card:hover { border-color: #d9dcff; }
.person-button { border-radius: 9px; background: var(--accent); }

.toast {
  right: 22px; bottom: 22px; padding: 12px 15px; border-radius: 12px;
  box-shadow: 0 18px 55px rgba(18,25,40,.19);
}

@media (max-width: 1050px) {
  .workspace-shell { grid-template-columns: 286px minmax(0, 1fr); }
  .app-topbar { grid-template-columns: 250px minmax(260px, 1fr) auto; gap: 16px; }
  .home-grid { grid-template-columns: 1fr 1fr; }
  .security-card { grid-column: 1 / -1; min-height: 105px; }
}

@media (max-width: 760px) {
  .workspace-shell { display: grid; grid-template-columns: 1fr; grid-template-rows: 60px minmax(0, 1fr); }
  .app-topbar { padding: 0 10px; grid-template-columns: auto minmax(120px,1fr) auto; gap: 8px; }
  .topbar-brand > div:last-child, .app-topbar .brand-mark, .global-search > kbd, .connection-status span { display: none; }
  .mobile-menu-trigger { display: grid; }
  .global-search > input { height: 38px; padding-right: 12px; }
  .topbar-actions { gap: 2px; }
  .connection-status { width: 28px; height: 28px; padding: 0; justify-content: center; border: 0; background: transparent; }
  .topbar-icon { width: 34px; height: 34px; }
  .sidebar {
    position: fixed; z-index: 80; top: 60px; bottom: 0; left: 0; width: min(318px,90vw);
    box-shadow: 24px 0 60px rgba(15,23,39,.22); transform: translateX(-102%); transition: transform .2s ease;
  }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-open .sidebar-scrim { position:fixed;inset:60px 0 0;z-index:75;display:block;border:0;background:rgba(15,23,39,.28);backdrop-filter:blur(2px); }
  .main { grid-column: 1; grid-row: 2; height: auto; }
  .people-panel { top: 60px; width: 100%; border-radius: 0; }
  .people-panel-open .utility-scrim { top: 60px; }
  .placeholder { padding: 16px; }
  .home-hero { min-height: 0; padding: 28px 24px; border-radius: 19px; }
  .hero-mark { display: none; }
  .home-hero h1 { font-size: 2rem; }
  .home-grid { grid-template-columns: 1fr; }
  .security-card { grid-column: auto; }
  .home-card { min-height: 112px; }
  .chat-header { min-height: 64px; padding: 9px 11px; }
  .peer-title > span { max-width: 40vw; }
  .peer-title > b, .header-action > span, .composer-hint { display: none; }
  .messages { padding: 17px 6px 24px; }
  .composer { padding: 8px 9px 11px; }
  .composer-send > span { display: none; }
}

@media (max-width: 460px) {
  .app-topbar { grid-template-columns: auto minmax(100px,1fr) auto; }
  #activity-panel-btn { display: none; }
  .home-hero .welcome-actions { width: 100%; flex-direction: column; }
  .home-hero .welcome-actions button { width: 100%; justify-content: center; }
  .snapshot-stats { gap: 3px; }
  .chat-actions { gap: 4px; }
  .header-action { min-width: 36px; height: 36px; padding: 0 9px; }
  .peer-copy small { max-width: 42vw; }
}

/* Secure attachments */
.attachment-preview {
  margin: 10px 10px 0; padding: 9px 10px; display: flex; align-items: center; gap: 10px;
  border: 1px solid #dfe3f5; border-radius: 11px; background: #f7f8ff;
}
.attachment-preview[hidden] { display: none; }
.attachment-preview-icon {
  width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 9px; color: var(--accent); background: #e8eaff;
}
.attachment-preview > span:nth-child(2) { min-width: 0; flex: 1; }
.attachment-preview strong, .attachment-preview small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.attachment-preview strong { color: var(--ink); font-size: .7rem; }
.attachment-preview small { margin-top: 3px; color: var(--muted); font-size: .58rem; }
.attachment-preview button {
  width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 8px;
  color: #818899; background: transparent;
}
.attachment-preview button:hover { color: var(--red); background: #fff; }
.attachment-preview .icon { width: 16px; height: 16px; }
.message-attachment {
  width: min(420px,100%); margin-top: 8px; padding: 10px; display: flex; align-items: center; gap: 10px;
  border: 1px solid #e0e4ec; border-radius: 12px; color: inherit; background: #fafbfc;
  text-decoration: none; transition: border .15s ease,background .15s ease,transform .15s ease;
}
.message-attachment:hover { border-color: #c8cdf9; background: #f7f7ff; transform: translateY(-1px); }
.message-attachment-icon {
  width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 10px; color: var(--accent); background: #eaecff;
}
.message-attachment > span:nth-child(2) { min-width: 0; flex: 1; }
.message-attachment strong, .message-attachment small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.message-attachment strong { color: #303646; font-size: .72rem; }
.message-attachment small { margin-top: 3px; color: #8a91a0; font-size: .59rem; }
.attachment-download { color: #8990a0; transform: rotate(180deg); }
.attachment-download .icon { width: 15px; height: 15px; }

/* Floating Teams-style call window */
.call-dock.call-overlay {
  inset: auto 22px 22px auto; width: min(430px,calc(100vw - 28px)); padding: 0;
  align-items: stretch; justify-content: stretch; color: #fff; background: transparent; backdrop-filter: none;
}
.call-dock .call-stage {
  position: relative; overflow: visible; width: 100%; min-width: 0; padding: 0; align-items: stretch;
  border: 1px solid rgba(255,255,255,.12); border-radius: 21px;
  background: linear-gradient(145deg,#20263a,#121725); box-shadow: 0 28px 80px rgba(7,11,22,.4); text-align: left;
}
.call-window-header {
  min-height: 57px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.call-window-header > div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; }
.call-window-header strong { font-size: .72rem; }
.call-window-header small { grid-column: 2; margin-top: 2px; color: #8f99ae; font-size: .55rem; }
.call-live-dot { grid-row: 1 / 3; width: 8px; height: 8px; border-radius: 50%; background: #36d28d; box-shadow: 0 0 0 4px rgba(54,210,141,.12); }
.call-window-header .call-security {
  margin: 0; padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; font-size: .5rem;
}
.call-window-header .call-security .icon { width: 11px; height: 11px; }
.call-dock .call-person { padding: 22px 16px 11px; }
.call-dock .call-person h2 { margin-top: 13px; }
.call-dock .call-person p { margin-top: 4px; }
.call-participants {
  overflow-x: auto; padding: 7px 13px 4px; display: flex; gap: 7px; scrollbar-width: thin;
}
.call-participant {
  min-width: 132px; padding: 8px; display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: rgba(255,255,255,.045);
}
.call-participant.invited { border-style: dashed; opacity: .78; }
.call-participant .avatar { flex: 0 0 auto; }
.call-participant span { min-width: 0; }
.call-participant strong, .call-participant small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.call-participant strong { color: #f2f4f8; font-size: .61rem; }
.call-participant small { margin-top: 3px; color: #949db1; font-size: .52rem; }
.call-dock .call-controls { margin: 8px 0 0; padding: 13px; justify-content: center; border-top: 1px solid rgba(255,255,255,.08); }
.call-dock .call-control { width: 61px; min-height: 53px; border-radius: 14px; }
.call-dock .call-control small { font-size: .51rem; }
.call-dock .screen-wrap {
  width: 100%; height: min(54vh,430px); margin: 0; border: 0; border-radius: 0; background: #080b12;
}
.call-dock .call-stage.has-screen { width: min(780px,calc(100vw - 28px)); padding: 0; }
.call-dock:has(.call-stage.has-screen) { width: min(780px,calc(100vw - 28px)); }
.call-stage.has-screen .call-window-header { display: flex; }
.call-stage.has-screen .call-person { display: none; }
.call-stage.has-screen .call-participants { padding-top: 10px; }
.presenter-label {
  position: absolute; left: 10px; bottom: 10px; padding: 5px 8px; border-radius: 7px;
  color: #fff; background: rgba(0,0,0,.56); font-size: .54rem; font-weight: 700;
}
.screen-wrap:fullscreen, .screen-wrap:-webkit-full-screen {
  width: 100vw!important; height: 100vh!important; margin: 0; border: 0; border-radius: 0; background: #000;
}
.screen-wrap:fullscreen video, .screen-wrap:-webkit-full-screen video { width: 100%; height: 100%; object-fit: contain; }
.call-invite-popover {
  position: absolute; z-index: 4; right: 12px; bottom: 86px; width: min(330px,calc(100vw - 52px)); padding: 13px;
  border: 1px solid #dfe3eb; border-radius: 14px; color: var(--ink); background: #fff;
  box-shadow: 0 22px 60px rgba(4,8,18,.35);
}
.call-invite-popover[hidden] { display: none; }
.call-invite-popover > label { display: block; margin-bottom: 9px; font-size: .68rem; font-weight: 800; }
.call-invite-search-wrap { height: 38px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid #dfe3eb; border-radius: 10px; }
.call-invite-search-wrap .icon { width: 15px; height: 15px; color: #8b92a1; }
.call-invite-search-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .68rem; }
.call-invite-state { padding: 12px 4px 4px; color: #9096a3; font-size: .6rem; text-align: center; }
.call-invite-results { max-height: 210px; margin-top: 6px; overflow: auto; list-style: none; }
.call-invite-results button {
  width: 100%; padding: 7px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 9px; color: var(--ink); background: transparent; text-align: left;
}
.call-invite-results button:hover { background: #f4f5fa; }
.call-invite-results button > span { min-width: 0; flex: 1; }
.call-invite-results strong, .call-invite-results small { display: block; }
.call-invite-results strong { font-size: .65rem; }
.call-invite-results small { margin-top: 2px; color: var(--muted); font-size: .55rem; }
.call-invite-results b { color: var(--accent); font-size: .59rem; }
.incoming-call-toast {
  position: fixed; z-index: 120; top: 86px; right: 22px; width: min(365px,calc(100vw - 28px)); color: #fff;
}
.incoming-call {
  padding: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px;
  background: linear-gradient(145deg,#242b41,#141928); box-shadow: 0 24px 70px rgba(7,11,22,.38);
}
.incoming-call-copy { display: flex; align-items: center; gap: 11px; }
.incoming-call-copy > div:last-child { min-width: 0; }
.incoming-call-copy span { color: #8fdcb8; font-size: .54rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.incoming-call-copy h2 { overflow: hidden; margin-top: 3px; font-size: .92rem; white-space: nowrap; text-overflow: ellipsis; }
.incoming-call-copy p { margin-top: 3px; color: #9ca6ba; font-size: .59rem; }
.incoming-call .call-controls { margin-top: 13px; justify-content: flex-end; }
.incoming-call .call-control { width: 74px; min-height: 44px; flex-direction: row; border-radius: 12px; }
.incoming-call .call-control small { font-size: .56rem; }

@media (max-width: 760px) {
  .call-dock.call-overlay { right: 8px; bottom: 8px; width: calc(100vw - 16px); }
  .call-dock:has(.call-stage.has-screen), .call-dock .call-stage.has-screen { width: calc(100vw - 16px); }
  .call-dock .screen-wrap { height: 42vh; }
  .incoming-call-toast { top: 70px; right: 8px; width: calc(100vw - 16px); }
  .composer-security { display: none; }
}

/* Profile, password, and audio settings */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.forgot-password-link {
  width: 100%; margin-top: 13px; border: 0; color: var(--primary); background: transparent;
  font-size: .67rem; font-weight: 750; text-align: center;
}
.forgot-password-link:hover { text-decoration: underline; }
.settings-modal { width: min(560px,calc(100vw - 24px)); }
.settings-modal form { width: 100%; max-width: none; max-height: min(84vh,760px); overflow: auto; padding: 25px; }
.settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.settings-heading h2 { margin-top: 6px; }
.settings-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-section-title { display: flex; align-items: center; gap: 10px; }
.settings-section-title > div { min-width: 0; }
.settings-section-title strong, .settings-section-title small { display: block; }
.settings-section-title strong { font-size: .75rem; }
.settings-section-title small { margin-top: 3px; color: var(--muted); font-size: .59rem; }
.settings-icon {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  color: var(--accent); background: var(--accent-soft);
}
.settings-icon .icon { width: 17px; height: 17px; }
.avatar-setting { margin-top: 15px; display: flex; align-items: center; gap: 14px; }
.avatar-setting .avatar { flex: 0 0 auto; }
.avatar-setting p { margin: 7px 0 0; color: var(--muted); font-size: .58rem; }
.settings-field { margin-top: 13px; display: block; }
.settings-field > span { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: .62rem; font-weight: 750; }
.settings-field select {
  width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line-strong);
  border-radius: 10px; outline: 0; color: var(--ink); background: #fff; font-size: .69rem;
}
.settings-field select:focus { border-color: #999eff; box-shadow: 0 0 0 3px rgba(98,103,242,.1); }
.settings-field select:disabled { color: #a0a5b0; background: #f4f5f7; }
.settings-toggle { margin-top: 13px; padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.settings-toggle + .settings-toggle { margin-top: 0; border-top: 1px solid #eef0f4; }
.settings-toggle strong, .settings-toggle small { display: block; }
.settings-toggle strong { font-size: .67rem; }
.settings-toggle small { margin-top: 3px; color: var(--muted); font-size: .57rem; }
.settings-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.reset-link-panel { margin-top: 12px; padding: 14px; border: 1px solid #cae9da; border-radius: 12px; background: #f5fcf8; }
.reset-link-panel[hidden] { display: none; }
.reset-link-panel label { display: block; margin-bottom: 7px; color: #176e4f; font-size: .64rem; font-weight: 800; }
.reset-link-panel > div { display: flex; gap: 7px; }
.reset-link-panel input { min-width: 0; height: 36px; padding: 0 9px; flex: 1; border: 1px solid #bcdcca; border-radius: 8px; color: #315044; background: #fff; font-size: .62rem; }
.reset-link-panel small { display: block; margin-top: 7px; color: #5e796d; font-size: .57rem; }

@media (max-width: 460px) {
  .settings-modal form { padding: 19px; }
  .reset-link-panel > div { align-items: stretch; flex-direction: column; }
}
