:root {
  --bg: #070910;
  --bg-deep: #05070c;
  --panel: #0b0f18;
  --panel-2: #101522;
  --panel-3: #151b29;
  --panel-4: #1a2131;
  --line: rgba(255,255,255,.065);
  --line-strong: rgba(255,255,255,.11);
  --line-accent: rgba(126,107,255,.26);
  --text: #f5f7ff;
  --text-soft: #c7cede;
  --muted: #8b95aa;
  --muted-2: #5d687e;
  --muted-3: #3f485b;
  --accent: #7567ee;
  --accent-2: #9a8cff;
  --accent-soft: rgba(117,103,238,.13);
  --green: #4be29a;
  --green-soft: rgba(75,226,154,.1);
  --yellow: #f3bf61;
  --red: #ff6473;
  --red-soft: rgba(255,100,115,.09);
  --shadow: 0 26px 80px rgba(0,0,0,.42);
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: var(--bg-deep); color: var(--text); }
html, body, button, input, textarea, select { font-family: "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
svg { display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mobile-only { display: none !important; }
::selection { color: #fff; background: rgba(117,103,238,.52); }
* { scrollbar-width: thin; scrollbar-color: rgba(117,103,238,.3) transparent; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(117,103,238,.26); }
*::-webkit-scrollbar-thumb:hover { background: rgba(117,103,238,.44); }

/* AUTH */
.auth-screen { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: minmax(0,1.14fr) minmax(420px,.86fr); overflow: hidden; background: linear-gradient(135deg,#070910 0%,#090c14 55%,#080a12 100%); }
.auth-screen::before { content:""; position:absolute; inset:0; pointer-events:none; background-image: linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(90deg,rgba(0,0,0,.9),transparent 86%); }
.auth-ambient { position:absolute; border-radius:50%; filter: blur(100px); opacity:.5; pointer-events:none; }
.auth-ambient-a { width:540px; height:540px; left:-160px; top:-190px; background: rgba(117,103,238,.31); }
.auth-ambient-b { width:470px; height:470px; right:-130px; bottom:-170px; background: rgba(80,72,184,.24); }
.auth-showcase { position:relative; z-index:1; display:flex; flex-direction:column; justify-content:space-between; padding:54px clamp(44px,5.5vw,90px); border-right:1px solid var(--line); }
.auth-brand { display:flex; align-items:center; gap:13px; }
.auth-brand-mark, .auth-mini-logo { display:grid; place-items:center; color:#fff; font-weight:900; background: linear-gradient(145deg,#6558db,#8f80fa); border:1px solid rgba(180,169,255,.3); box-shadow: 0 14px 36px rgba(117,103,238,.22), inset 0 1px 0 rgba(255,255,255,.12); }
.auth-brand-mark { width:44px; height:44px; border-radius:14px; font-size:19px; }
.auth-brand-name { font-size:14px; font-weight:850; letter-spacing:.08em; }
.auth-brand-sub { margin-top:4px; color:var(--muted-2); font-size:9px; font-weight:750; letter-spacing:.16em; }
.auth-hero { max-width:760px; margin: 0 0 7vh; }
.auth-kicker { display:inline-flex; align-items:center; gap:9px; margin-bottom:21px; color:#9e96ff; font-size:10px; font-weight:850; letter-spacing:.16em; }
.auth-kicker::before { content:""; width:22px; height:1px; background:var(--accent-2); }
.auth-hero h1 { margin:0; max-width:760px; font-size:clamp(56px,6.8vw,108px); line-height:.9; letter-spacing:-.065em; font-weight:850; }
.auth-hero p { max-width:620px; margin:30px 0 0; color:#a5aec1; font-size:17px; line-height:1.65; }
.auth-feature-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:36px; max-width:690px; }
.auth-feature-row > div { min-height:82px; padding:17px 18px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.022); }
.auth-feature-row strong { display:block; color:#dedbff; font-size:10px; letter-spacing:.15em; }
.auth-feature-row span { display:block; margin-top:8px; color:var(--muted); font-size:12px; }
.auth-footnote { display:flex; align-items:center; gap:9px; color:var(--muted-2); font-size:9px; font-weight:750; letter-spacing:.15em; }
.auth-footnote span { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 15px rgba(75,226,154,.48); }
.auth-form-side { position:relative; z-index:2; display:grid; place-items:center; padding:36px; }
.auth-card { width:min(440px,100%); padding:30px; border:1px solid var(--line-strong); border-radius:24px; background:linear-gradient(160deg,rgba(18,23,36,.95),rgba(9,12,20,.97)); box-shadow:0 36px 100px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.025); backdrop-filter:blur(22px); }
.auth-card-head { display:flex; align-items:center; gap:11px; padding-bottom:22px; border-bottom:1px solid var(--line); }
.auth-mini-logo { width:38px; height:38px; border-radius:12px; font-size:15px; }
.auth-card-head strong { display:block; font-size:12px; letter-spacing:.06em; }
.auth-card-head span { display:block; margin-top:3px; color:var(--muted-2); font-size:10px; }
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin:22px 0 27px; padding:4px; border:1px solid rgba(255,255,255,.04); border-radius:12px; background:rgba(255,255,255,.025); }
.auth-tab { min-height:38px; border:0; border-radius:9px; color:var(--muted); background:transparent; font-size:12px; font-weight:720; }
.auth-tab.active { color:#fff; background:#171d2b; box-shadow:inset 0 1px 0 rgba(255,255,255,.035); }
.auth-form-title { margin-bottom:24px; }
.auth-form-title h2 { margin:0; font-size:25px; letter-spacing:-.025em; }
.auth-form-title p { margin:7px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.auth-card label { display:block; margin:16px 0; }
.auth-card label > span { display:block; margin-bottom:8px; color:#929caf; font-size:9px; font-weight:850; letter-spacing:.13em; }
.auth-card input { width:100%; min-height:46px; padding:0 14px; outline:0; border:1px solid var(--line); border-radius:11px; color:#fff; background:#090c13; transition:border-color .15s, box-shadow .15s, background .15s; }
.auth-card input::placeholder { color:#404a5d; }
.auth-card input:focus { border-color:rgba(134,119,255,.52); background:#0b0f18; box-shadow:0 0 0 3px rgba(117,103,238,.08); }
.primary { border:0; color:#fff; background:linear-gradient(135deg,#6759df,#8a78f4); box-shadow:0 12px 30px rgba(117,103,238,.2); }
.auth-submit { width:100%; min-height:48px; margin-top:7px; border-radius:12px; font-size:12px; font-weight:800; }
.auth-submit:hover { filter:brightness(1.07); transform:translateY(-1px); }
.error-box { margin-top:15px; padding:11px 13px; border:1px solid rgba(255,100,115,.21); border-radius:10px; color:#ffadb7; background:rgba(255,100,115,.08); font-size:11px; }
.auth-security { display:flex; align-items:center; justify-content:center; gap:8px; margin-top:20px; color:var(--muted-2); font-size:9px; }
.auth-security-dot { width:6px; height:6px; border-radius:50%; background:var(--green); box-shadow:0 0 11px rgba(75,226,154,.42); }

/* APPLICATION */
.app { width:100%; height:100%; display:grid; grid-template-columns:78px 318px minmax(500px,1fr) 292px; background:var(--bg); }
.server-rail { position:relative; display:flex; flex-direction:column; align-items:center; padding:14px 10px; overflow:hidden auto; border-right:1px solid var(--line); background:linear-gradient(180deg,#05070c,#070910); }
.server-rail::after { content:""; position:absolute; right:-1px; top:0; bottom:0; width:1px; background:linear-gradient(180deg,transparent,rgba(117,103,238,.16),transparent); pointer-events:none; }
.server-logo, .rail-server { position:relative; display:grid; place-items:center; width:54px; height:54px; min-width:54px; min-height:54px; padding:0; border-radius:17px; border:1px solid rgba(255,255,255,.055); color:#fff; background:#111522; transition:.17s ease; }
.server-logo span, .rail-server span { position:relative; z-index:1; }
.server-logo { border-color:rgba(165,151,255,.32); background:linear-gradient(145deg,#6659db,#8b79f5); box-shadow:0 12px 32px rgba(117,103,238,.2), inset 0 1px 0 rgba(255,255,255,.11); font-size:21px; font-weight:900; }
.server-logo:hover, .rail-server:not(:disabled):hover { transform:translateY(-1px); border-radius:14px; }
.rail-divider { width:34px; height:1px; margin:13px 0; background:var(--line-strong); }
.rail-server { margin:0 0 10px; color:#aab4c7; font-size:12px; font-weight:850; }
.rail-server.active { color:#fff; border-color:rgba(141,125,255,.28); background:linear-gradient(145deg,#252b45,#1b2135); box-shadow:inset 0 1px 0 rgba(255,255,255,.035); }
.rail-server.active::before { content:""; position:absolute; left:-12px; width:4px; height:28px; border-radius:0 4px 4px 0; background:var(--accent-2); box-shadow:0 0 16px rgba(154,140,255,.34); }
.rail-server.disabled { color:#505a6d; }
.rail-live { position:absolute; right:5px; bottom:5px; width:8px; height:8px; border:2px solid #202638; border-radius:50%; background:var(--green); box-shadow:0 0 9px rgba(75,226,154,.45); }
.rail-spacer { flex:1; }
.rail-status { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; border:1px solid var(--line); background:#0d111a; }
.rail-status span { width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 12px rgba(75,226,154,.46); }

.sidebar { min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; border-right:1px solid var(--line); background:linear-gradient(180deg,#0a0d15,#090c13 62%,#080b12); }
.workspace-header { flex:0 0 76px; display:flex; align-items:center; gap:11px; padding:0 18px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.007); }
.workspace-brand-mark { width:34px; height:34px; display:grid; place-items:center; border:1px solid rgba(159,145,255,.25); border-radius:11px; color:#fff; background:linear-gradient(145deg,#6256d4,#8878f3); box-shadow:0 8px 24px rgba(117,103,238,.14); font-size:13px; font-weight:900; }
.workspace-heading { min-width:0; }
.workspace-name { font-size:13px; font-weight:850; letter-spacing:.035em; }
.workspace-sub { margin-top:4px; color:var(--muted-2); font-size:8px; font-weight:780; letter-spacing:.15em; }
.workspace-card { flex:0 0 62px; margin:13px 12px 3px; padding:0 12px; display:flex; align-items:center; justify-content:space-between; border:1px solid var(--line); border-radius:13px; background:linear-gradient(145deg,rgba(255,255,255,.027),rgba(255,255,255,.014)); box-shadow:inset 0 1px 0 rgba(255,255,255,.018); }
.workspace-card-main { display:flex; align-items:center; gap:9px; min-width:0; }
.workspace-live-dot { width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:var(--green); box-shadow:0 0 12px rgba(75,226,154,.45); }
.workspace-card strong { display:block; font-size:11px; letter-spacing:.04em; }
.workspace-card small { display:block; margin-top:3px; color:var(--muted-2); font-size:8px; letter-spacing:.09em; }
.workspace-live-badge { padding:4px 7px; border:1px solid rgba(75,226,154,.12); border-radius:999px; color:#74eeb0; background:rgba(75,226,154,.08); font-size:8px; font-weight:850; letter-spacing:.08em; }
.channel-list { flex:1 1 auto; min-height:0; overflow:auto; padding:8px 10px 18px; }
.channel-category { display:flex; align-items:center; gap:6px; padding:17px 9px 7px; color:#68738a; font-size:9px; font-weight:850; letter-spacing:.14em; text-transform:uppercase; }
.channel-category::before { content:"⌄"; color:#4e586d; font-size:11px; transform:translateY(-1px); }
.channel-button { position:relative; width:100%; min-height:42px; display:flex; align-items:center; gap:9px; margin:2px 0; padding:0 10px; border:1px solid transparent; border-radius:10px; color:#919bae; background:transparent; text-align:left; font-size:13px; font-weight:580; transition:.14s ease; }
.channel-button:hover { color:#e8ebf5; border-color:rgba(255,255,255,.035); background:rgba(255,255,255,.03); }
.channel-button.active { color:#fff; border-color:rgba(117,103,238,.16); background:linear-gradient(90deg,rgba(117,103,238,.14),rgba(117,103,238,.045)); box-shadow:inset 2px 0 0 var(--accent); }
.channel-button[data-channel-type="voice"].active { border-color:rgba(75,226,154,.12); background:linear-gradient(90deg,rgba(75,226,154,.06),rgba(255,255,255,.012)); box-shadow:inset 2px 0 0 var(--green); }
.channel-prefix { width:22px; min-width:22px; display:grid; place-items:center; color:#616d84; }
.channel-prefix svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.channel-button.active .channel-prefix { color:var(--accent-2); }
.channel-button[data-channel-type="voice"].active .channel-prefix { color:var(--green); }
.channel-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.unread-badge { margin-left:auto; min-width:20px; height:20px; padding:0 6px; display:grid; place-items:center; border-radius:999px; color:#fff; background:linear-gradient(135deg,#7064e8,#8b7bf8); font-size:9px; font-weight:900; box-shadow:0 6px 18px rgba(117,103,238,.18); }

.user-panel { flex:0 0 76px; display:flex; align-items:center; gap:10px; padding:10px 12px; border-top:1px solid var(--line); background:#080b12; }
.user-identity { position:relative; }
.avatar { width:42px; height:42px; min-width:42px; display:grid; place-items:center; overflow:hidden; border:1px solid rgba(255,255,255,.08); border-radius:13px; color:#dfe4f4; background:linear-gradient(145deg,#2a3246,#191f2e); font-size:11px; font-weight:900; }
.user-online-dot { position:absolute; right:-1px; bottom:-1px; width:11px; height:11px; border:3px solid #080b12; border-radius:50%; background:var(--green); }
.user-panel-info { flex:1; min-width:0; }
.user-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:820; }
#presenceSelect { width:100%; margin-top:3px; padding:0; border:0; outline:0; color:#6f7a90; background:transparent; font-size:9px; }
.icon-button { display:grid; place-items:center; border:0; color:#8993a8; background:transparent; }
.icon-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.logout-button, .user-panel .v04-header-button { width:36px; height:36px; min-width:36px; border:1px solid transparent; border-radius:10px; }
.logout-button:hover, .user-panel .v04-header-button:hover { color:#fff; border-color:var(--line); background:rgba(255,255,255,.035); }

.chat { min-width:0; min-height:0; display:grid; grid-template-rows:76px minmax(0,1fr) auto auto; overflow:hidden; background:radial-gradient(circle at 52% -16%,rgba(117,103,238,.055),transparent 36%),#090c14; }
.chat-header { position:relative; z-index:10; display:flex; align-items:center; justify-content:space-between; min-width:0; padding:0 22px; border-bottom:1px solid var(--line); background:rgba(9,12,20,.94); backdrop-filter:blur(18px) saturate(120%); }
.chat-header::after { content:""; position:absolute; bottom:-1px; left:18%; right:18%; height:1px; pointer-events:none; background:linear-gradient(90deg,transparent,rgba(117,103,238,.19),transparent); }
.header-left { min-width:0; display:flex; align-items:center; gap:12px; }
.channel-symbol { width:38px; height:38px; min-width:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:11px; color:#9b91ff; background:linear-gradient(145deg,rgba(117,103,238,.12),rgba(255,255,255,.018)); }
.channel-symbol svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.channel-headings { min-width:0; }
.channel-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#f7f8ff; font-size:16px; font-weight:780; letter-spacing:-.012em; }
.channel-description { margin-top:3px; color:var(--muted-2); font-size:9px; font-weight:650; letter-spacing:.075em; text-transform:uppercase; }
.header-actions { display:flex; align-items:center; gap:8px; }
.online-counter { height:34px; display:inline-flex; align-items:center; gap:7px; padding:0 10px; border:1px solid var(--line); border-radius:10px; color:#8390a5; background:rgba(255,255,255,.022); font-size:9px; font-weight:700; }
.online-counter i { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 10px rgba(75,226,154,.45); }
.owner-button { height:34px; padding:0 12px; border:1px solid rgba(117,103,238,.25); border-radius:10px; color:#c4bdff; background:rgba(117,103,238,.08); font-size:9px; font-weight:850; letter-spacing:.07em; }
.owner-button:hover { border-color:rgba(154,140,255,.42); background:rgba(117,103,238,.14); }
.v04-header-button { width:36px; height:36px; min-width:36px; display:grid; place-items:center; border:1px solid var(--line); border-radius:10px; color:#8f9aaf; background:rgba(255,255,255,.022); transition:.14s ease; }
.v04-header-button:hover { color:#fff; border-color:rgba(117,103,238,.2); background:rgba(117,103,238,.08); transform:translateY(-1px); }
.v04-header-button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.messages { min-height:0; overflow:auto; padding:26px 34px 18px; }
.message { position:relative; display:grid; grid-template-columns:48px minmax(0,1fr); gap:13px; max-width:1040px; margin:2px auto; padding:10px 12px; border-radius:12px; transition:background .12s ease; }
.message:hover { background:rgba(255,255,255,.022); }
.message-avatar { width:44px; height:44px; display:grid; place-items:center; overflow:hidden; border:1px solid rgba(255,255,255,.065); border-radius:14px; color:#dce2f4; background:linear-gradient(145deg,#273045,#171e2d); font-size:11px; font-weight:900; }
.message-content { min-width:0; }
.message-head { display:flex; align-items:center; flex-wrap:wrap; gap:7px; min-height:20px; }
.message-author { color:#f4f6ff; font-size:13px; font-weight:820; }
.message-role { display:inline-flex; align-items:center; min-height:18px; padding:0 6px; border:1px solid rgba(117,103,238,.16); border-radius:6px; color:#a8a0ff; background:rgba(117,103,238,.07); font-size:8px; font-weight:820; letter-spacing:.04em; }
.message-time { color:#59647a; font-size:9px; }
.message-body { margin-top:4px; color:#d2d7e3; font-size:14px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.message-delete { position:absolute; right:10px; top:9px; opacity:0; height:28px; padding:0 8px; border:1px solid var(--line); border-radius:8px; color:#d58b96; background:#111620; font-size:9px; }
.message:hover .message-delete { opacity:1; }
.reply-preview { margin:1px 0 7px; padding:5px 8px; overflow:hidden; border-left:2px solid rgba(154,140,255,.5); border-radius:0 7px 7px 0; color:#7f8aa0; background:rgba(117,103,238,.04); font-size:10px; white-space:nowrap; text-overflow:ellipsis; }
.message-attachments { display:flex; flex-wrap:wrap; gap:9px; margin-top:10px; }
.message-attachments img { display:block; max-width:min(480px,100%); max-height:360px; object-fit:contain; border:1px solid var(--line); border-radius:14px; background:#070910; }
.file-card { display:inline-flex; align-items:center; min-height:42px; padding:0 13px; border:1px solid var(--line); border-radius:10px; color:#c6cbff; background:#121827; text-decoration:none; font-size:11px; }
.reaction-row { min-height:26px; display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin-top:8px; }
.reaction-chip, .reaction-add { min-height:26px; padding:0 8px; border:1px solid var(--line); border-radius:8px; color:#9ba5b8; background:#111722; font-size:10px; }
.reaction-chip:hover, .reaction-add:hover { color:#fff; border-color:rgba(117,103,238,.2); }
.reaction-chip.mine { color:#d3ceff; border-color:rgba(117,103,238,.4); background:rgba(117,103,238,.12); }
.message-v03-actions { display:flex; gap:4px; margin-top:6px; opacity:0; transition:opacity .12s; }
.message:hover .message-v03-actions { opacity:1; }
.message-v03-actions button { min-height:25px; padding:0 7px; border:1px solid transparent; border-radius:7px; color:#727e93; background:transparent; font-size:9px; }
.message-v03-actions button:hover { color:#dce1ec; border-color:var(--line); background:rgba(255,255,255,.03); }
.empty-channel { min-height:100%; display:flex; flex-direction:column; justify-content:flex-end; max-width:1040px; margin:0 auto; padding:0 12px 36px; }
.empty-icon { width:64px; height:64px; display:grid; place-items:center; margin-bottom:18px; border:1px solid var(--line); border-radius:20px; color:#a99fff; background:linear-gradient(145deg,rgba(117,103,238,.14),rgba(255,255,255,.02)); font-size:27px; }
.empty-channel h2 { margin:0 0 7px; font-size:27px; letter-spacing:-.025em; }
.empty-channel p { margin:0; color:var(--muted); font-size:13px; }
.typing { min-height:24px; max-width:1040px; width:calc(100% - 68px); margin:0 auto; padding:3px 12px 0; color:#6f7a90; font-size:10px; }
.composer-wrap { padding:0 34px 24px; }
.composer-wrap > * { max-width:1040px; margin-left:auto; margin-right:auto; }
.composer-extras { margin-bottom:7px; padding:8px; display:flex; flex-wrap:wrap; gap:6px; border:1px solid var(--line); border-radius:12px; background:#0f141f; }
.composer-reply, .pending-file { max-width:100%; display:flex; align-items:center; gap:8px; padding:7px 9px; border-radius:8px; color:#9ba6ba; background:#171e2b; font-size:10px; }
.composer-reply span, .pending-file span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.composer-reply button, .pending-file button { border:0; color:#68758a; background:transparent; }
.composer { min-height:56px; display:flex; align-items:flex-end; gap:8px; padding:9px; overflow:hidden; border:1px solid rgba(255,255,255,.085); border-radius:16px; background:linear-gradient(180deg,#151b28,#121722); box-shadow:0 18px 42px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.02); transition:border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color:rgba(117,103,238,.28); box-shadow:0 18px 45px rgba(0,0,0,.2), 0 0 0 1px rgba(117,103,238,.045); }
.composer textarea { flex:1; min-height:36px; max-height:150px; resize:none; padding:8px 4px; outline:0; border:0; color:#eef1f8; background:transparent; font-size:13px; line-height:1.45; }
.composer textarea::placeholder { color:#687286; }
.attach-button, .send-button { width:38px; height:38px; min-width:38px; display:grid; place-items:center; border-radius:11px; }
.attach-button { border:1px solid var(--line); color:#8691a6; background:#1a202e; }
.attach-button:hover { color:#fff; border-color:rgba(117,103,238,.2); background:#202738; }
.attach-button svg, .send-button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.send-button { border:0; color:#fff; background:linear-gradient(135deg,#6759df,#8d7bf6); box-shadow:0 8px 20px rgba(117,103,238,.2); }
.send-button:hover { filter:brightness(1.08); transform:translateY(-1px); }
.composer-tools { align-self:center; display:flex; align-items:center; gap:6px; color:#687388; }
.composer-tools span { height:28px; min-width:28px; display:grid; place-items:center; padding:0 5px; border-radius:7px; font-size:9px; font-weight:800; }

.members { min-width:0; min-height:0; overflow:hidden; border-left:1px solid var(--line); background:linear-gradient(180deg,#090c13,#080b12); }
.members-header { height:76px; display:flex; align-items:center; justify-content:space-between; padding:0 17px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.006); }
.members-header span { display:block; color:#5f6a80; font-size:8px; font-weight:850; letter-spacing:.15em; }
.members-header strong { display:block; margin-top:4px; color:#e8ebf4; font-size:12px; font-weight:780; }
.members-live-dot { width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 12px rgba(75,226,154,.45); }
.member-list { height:calc(100% - 76px); overflow:auto; padding:8px 10px 22px; }
.member-role { padding:17px 7px 7px; color:#667187; font-size:9px; font-weight:850; letter-spacing:.11em; text-transform:uppercase; }
.member { display:flex; align-items:center; gap:10px; min-height:53px; margin:2px 0; padding:7px 8px; border:1px solid transparent; border-radius:11px; transition:.13s ease; }
.member:hover { border-color:rgba(255,255,255,.035); background:rgba(255,255,255,.028); }
.member-avatar-wrap { position:relative; flex:0 0 auto; }
.member-avatar { width:39px; height:39px; display:grid; place-items:center; overflow:hidden; border:1px solid rgba(255,255,255,.055); border-radius:13px; color:#dce2ef; background:linear-gradient(145deg,#252e42,#171d2b); font-size:10px; font-weight:850; }
.presence-dot { position:absolute; right:-1px; bottom:-1px; width:11px; height:11px; border:3px solid #090c13; border-radius:50%; background:#4d5668; }
.presence-dot.online { background:var(--green); }
.presence-dot.idle { background:var(--yellow); }
.presence-dot.dnd { background:var(--red); }
.member-name { max-width:175px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#d9deea; font-size:12px; font-weight:720; }
.member-status { max-width:175px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:2px; color:#59657a; font-size:9px; }

/* VOICE SIDEBAR OCCUPANCY */
.v05-occupancy { display:grid; gap:2px; margin:2px 10px 9px 38px; padding:2px 0 2px 9px; border-left:1px solid rgba(255,255,255,.05); }
.v05-occupancy > div { min-height:31px; display:flex; align-items:center; gap:8px; padding:3px 7px; border-radius:8px; color:#7e899d; font-size:11px; }
.v05-occupancy > div:hover { color:#dce1ec; background:rgba(255,255,255,.024); }
.v05-occupancy .speaking { color:#bff9d7; background:rgba(75,226,154,.035); }
.v05-occupancy .v05-avatar { width:23px; height:23px; flex:0 0 23px; border-radius:8px; object-fit:cover; }
.v05-occupancy .v05-fallback { display:grid; place-items:center; color:#d9deff; background:rgba(117,103,238,.18); font-size:8px; font-weight:850; }
.v05-occupancy .speaking .v05-avatar { box-shadow:0 0 0 2px rgba(75,226,154,.8),0 0 14px rgba(75,226,154,.12); }
.v05-occupancy i { margin-left:auto; color:#ff9ea8; font-size:9px; font-style:normal; }

/* VOICE DOCK */
.voice-dock { flex:0 0 auto; margin:0 10px 8px; padding:11px; border:1px solid rgba(75,226,154,.11); border-radius:13px; background:linear-gradient(145deg,#0e171a,#0b1017); box-shadow:0 12px 28px rgba(0,0,0,.14); }
.voice-dock-status { color:var(--green); font-size:8px; font-weight:900; letter-spacing:.13em; }
.voice-dock-room { margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#e7ebf3; font-size:11px; font-weight:760; }
.voice-dock-actions { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; margin-top:9px; }
.voice-dock-actions button, #v05Dock { min-width:0; min-height:32px; padding:0 6px; overflow:hidden; border:1px solid var(--line); border-radius:8px; color:#9da7b9; background:rgba(255,255,255,.035); font-size:9px; white-space:nowrap; text-overflow:ellipsis; }
.voice-dock-actions button:hover, #v05Dock:hover { color:#fff; border-color:rgba(117,103,238,.19); background:rgba(117,103,238,.08); }
.voice-dock-actions .voice-danger { color:#ff9da8; }

/* VOICE WORKSPACE */
.voice-placeholder { grid-row:2 / 5; min-height:0; overflow:hidden; }
.brill-voice { position:relative; height:100%; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:16px; overflow:auto; padding:28px 30px 24px; background:radial-gradient(circle at 50% 18%,rgba(117,103,238,.09),transparent 34%),radial-gradient(circle at 72% 76%,rgba(58,88,170,.045),transparent 28%); }
.brill-voice::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.25; background-image:linear-gradient(rgba(255,255,255,.012) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.012) 1px,transparent 1px); background-size:48px 48px; mask-image:linear-gradient(to bottom,rgba(0,0,0,.8),transparent 74%); }
.brill-voice-card { position:relative; z-index:1; width:min(1080px,100%); min-height:280px; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:24px; margin:0 auto; padding:34px 38px; overflow:hidden; border:1px solid rgba(255,255,255,.075); border-radius:24px; background:linear-gradient(145deg,rgba(18,23,37,.94),rgba(9,12,21,.97)); box-shadow:0 28px 80px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.025); }
.brill-voice-card::before { content:""; position:absolute; inset:0; pointer-events:none; background:radial-gradient(circle at 15% 0%,rgba(117,103,238,.16),transparent 36%),radial-gradient(circle at 100% 100%,rgba(75,226,154,.035),transparent 32%); }
.brill-voice-card::after { content:"BRILL CONNECT · REALTIME VOICE"; position:absolute; top:22px; left:38px; color:#677288; font-size:8px; font-weight:850; letter-spacing:.16em; }
.brill-voice-logo { position:relative; z-index:1; width:92px; height:92px; display:grid; place-items:center; border:1px solid rgba(154,140,255,.3); border-radius:27px; color:#e7e3ff; background:linear-gradient(145deg,rgba(117,103,238,.38),rgba(76,66,157,.25)); box-shadow:0 18px 44px rgba(76,65,172,.18), inset 0 1px 0 rgba(255,255,255,.08); font-size:32px; }
.brill-voice-copy { position:relative; z-index:1; min-width:0; }
.brill-voice-card h2 { margin:0; color:#fff; font-size:31px; font-weight:800; letter-spacing:-.035em; }
.brill-voice-description { margin-top:8px; color:#8b95aa; font-size:10px; font-weight:680; letter-spacing:.08em; }
.voice-status { margin-top:12px; display:inline-flex; align-items:center; min-height:24px; padding:0 9px; border:1px solid var(--line); border-radius:999px; color:#6f7b91; background:rgba(255,255,255,.024); font-size:9px; }
.voice-join { position:relative; z-index:1; min-width:190px; min-height:48px; padding:0 20px; border:1px solid rgba(164,151,255,.29); border-radius:12px; color:#fff; background:linear-gradient(135deg,#6759df,#8d7bf6); box-shadow:0 12px 30px rgba(117,103,238,.2); font-size:12px; font-weight:820; }
.voice-join:hover:not(:disabled) { transform:translateY(-1px); filter:brightness(1.08); }
.voice-join:disabled { color:#aef1cc; border-color:rgba(75,226,154,.2); background:rgba(75,226,154,.08); box-shadow:none; }
.brill-voice-card.connected { min-height:190px; }
.brill-voice-card.connected .brill-voice-logo { width:74px; height:74px; border-radius:22px; font-size:26px; }
.brill-voice-card.connected::after { content:"BRILL CONNECT · LIVE SESSION"; color:#70dca6; }
.voice-users { position:relative; z-index:1; width:min(1080px,100%); min-height:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); align-content:start; gap:12px; margin:0 auto; padding:0; border:0; background:transparent; }
.voice-user { position:relative; min-height:150px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; padding:20px; overflow:hidden; border:1px solid var(--line); border-radius:18px; background:linear-gradient(145deg,#111724,#0c111b); transition:border-color .14s,transform .14s,background .14s; }
.voice-user::before { content:""; position:absolute; inset:0; pointer-events:none; background:radial-gradient(circle at 50% 0%,rgba(117,103,238,.07),transparent 50%); }
.voice-user:hover { transform:translateY(-1px); border-color:rgba(255,255,255,.1); }
.voice-user.speaking { border-color:rgba(75,226,154,.46); background:linear-gradient(145deg,rgba(75,226,154,.07),#0c111b 72%); box-shadow:0 0 0 1px rgba(75,226,154,.08),0 14px 38px rgba(75,226,154,.04); }
.voice-user-avatar { position:relative; z-index:1; width:66px; height:66px; display:grid; place-items:center; overflow:hidden; border:2px solid rgba(255,255,255,.055); border-radius:22px; color:#dfe4f3; background:linear-gradient(145deg,#293248,#171e2d); font-size:15px; font-weight:900; }
.voice-user.speaking .voice-user-avatar { border-color:var(--green); box-shadow:0 0 0 5px rgba(75,226,154,.07),0 0 24px rgba(75,226,154,.12); }
.voice-user-info { position:relative; z-index:1; text-align:center; }
.voice-user-name { color:#eef1f7; font-size:13px; font-weight:800; }
.voice-user-state { margin-top:4px; color:#68748a; font-size:9px; }
.voice-user.speaking .voice-user-state { color:#72e3a8; }
.voice-controls { position:relative; z-index:1; width:min(1080px,100%); display:grid; grid-template-columns:auto auto 1fr 1fr auto; gap:8px; margin:0 auto; padding:11px; border:1px solid var(--line); border-radius:16px; background:rgba(13,18,28,.94); box-shadow:0 18px 48px rgba(0,0,0,.16); backdrop-filter:blur(16px); }
.voice-control { min-height:42px; display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:0 14px; border:1px solid var(--line); border-radius:10px; color:#aab4c5; background:#151b27; font-size:10px; font-weight:750; }
.voice-control:hover { color:#fff; border-color:rgba(117,103,238,.2); }
.voice-control.active { color:#fff; border-color:rgba(117,103,238,.34); background:rgba(117,103,238,.13); }
.voice-control.danger { color:#ff9da8; border-color:rgba(255,100,115,.15); background:rgba(255,100,115,.055); }
.voice-control.danger:hover { color:#ffc1c8; border-color:rgba(255,100,115,.28); }
.voice-control svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.voice-device { min-width:0; height:42px; padding:0 11px; outline:0; border:1px solid var(--line); border-radius:10px; color:#9ea8b9; background:#111620; font-size:10px; }
#brillVoiceAudio { position:fixed; width:1px; height:1px; opacity:.01; overflow:hidden; pointer-events:none; }

/* V04 SOCIAL / SEARCH / PROFILE */
.v04-overlay { position:fixed; inset:0; z-index:30000; display:grid; place-items:center; padding:20px; background:rgba(3,5,10,.8); backdrop-filter:blur(20px) saturate(115%); }
.v04-modal { width:min(780px,100%); max-height:90vh; overflow:hidden; border:1px solid var(--line-strong); border-radius:22px; background:linear-gradient(155deg,#121725,#0a0e17); box-shadow:var(--shadow); }
.v04-modal-header { height:72px; display:flex; align-items:center; justify-content:space-between; padding:0 22px; border-bottom:1px solid var(--line); }
.v04-modal-header h2 { margin:0; font-size:18px; letter-spacing:-.02em; }
.v04-modal-header .icon-button { width:36px; height:36px; border:1px solid var(--line); border-radius:10px; }
.v04-modal-body { max-height:calc(90vh - 72px); overflow:auto; padding:18px; }
.v04-section { margin-bottom:12px; padding:16px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.022); }
.v04-section h3 { margin:0 0 12px; color:#7b879d; font-size:9px; font-weight:850; letter-spacing:.12em; text-transform:uppercase; }
.v04-search, .v04-profile { display:grid; gap:8px; }
.v04-search { grid-template-columns:1fr auto; }
.v04-search input, .v04-profile input { min-width:0; min-height:42px; padding:0 12px; outline:0; border:1px solid var(--line); border-radius:10px; color:#fff; background:#090d15; }
.v04-search input:focus, .v04-profile input:focus { border-color:rgba(117,103,238,.4); }
.v04-search button, .v04-profile button, .v04-row button { min-height:40px; padding:0 13px; border:1px solid rgba(117,103,238,.22); border-radius:10px; color:#fff; background:rgba(117,103,238,.16); }
.v04-row { min-height:58px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 0; border-bottom:1px solid var(--line); }
.v04-user-info { display:flex; align-items:center; gap:10px; min-width:0; }
.v04-avatar { width:42px; height:42px; min-width:42px; display:grid; place-items:center; overflow:hidden; border:1px solid var(--line); border-radius:13px; background:#192130; font-size:10px; font-weight:900; }
.v04-user-info strong { font-size:12px; }
.v04-user-info .muted { margin-top:2px; font-size:9px; }
.v04-actions { display:flex; gap:6px; }
.v04-actions .secondary { color:#9aa5b7; border-color:var(--line); background:#171d29; }
.v04-empty { padding:22px; text-align:center; color:#707c91; font-size:11px; }
.v04-message-result { width:100%; display:block; padding:12px; border:0; border-bottom:1px solid var(--line); text-align:left; color:#c4cad6; background:transparent; }
.v04-message-result:hover { background:rgba(255,255,255,.025); }

/* V05 VOICE CONTROL CENTER */
.v05-overlay { position:fixed; inset:0; z-index:40000; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(3,5,10,.84); backdrop-filter:blur(22px) saturate(120%); }
.v05-overlay.hidden { display:none !important; }
.v05-panel { width:min(800px,96vw); max-height:88vh; overflow:auto; padding:0; border:1px solid var(--line-strong); border-radius:22px; color:#fff; background:linear-gradient(155deg,#141a29,#090d16); box-shadow:var(--shadow); }
.v05-small { width:min(500px,96vw); }
.v05-panel header { min-height:76px; display:flex; align-items:center; justify-content:space-between; margin:0; padding:0 22px; border-bottom:1px solid var(--line); }
.v05-panel header small { color:#8f86fb; font-size:8px; font-weight:850; letter-spacing:.16em; }
.v05-panel h3 { margin:4px 0 0; font-size:18px; }
.v05-panel header button { width:36px; min-width:36px; padding:0; }
.v05-panel button, .v05-panel select, #v05Dock { min-height:36px; padding:0 11px; border:1px solid var(--line); border-radius:9px; color:#dfe3ef; background:rgba(255,255,255,.045); }
.v05-panel button:hover, #v05Dock:hover { color:#fff; border-color:rgba(117,103,238,.2); background:rgba(117,103,238,.09); }
.v05-panel button:disabled { opacity:.45; }
.v05-tools { display:flex; flex-wrap:wrap; gap:7px; margin:0; padding:14px 22px; border-bottom:1px solid var(--line); }
#v05Room { margin:0; padding:15px 22px 10px; color:#6f7b91; font-size:9px; font-weight:850; letter-spacing:.12em; text-transform:uppercase; }
#v05Users { display:grid; gap:8px; padding:0 22px 22px; }
.v05-user { display:flex; gap:11px; padding:12px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.025); }
.v05-user.speaking { border-color:rgba(75,226,154,.46); background:linear-gradient(90deg,rgba(75,226,154,.055),rgba(255,255,255,.018)); box-shadow:inset 3px 0 0 var(--green); }
.v05-avatar { width:40px; height:40px; flex:0 0 40px; border-radius:13px; object-fit:cover; }
.v05-fallback { display:flex; align-items:center; justify-content:center; color:#dedbff; background:rgba(117,103,238,.18); font-size:10px; font-weight:850; }
.v05-main { min-width:0; flex:1; }
.v05-name { display:flex; align-items:center; flex-wrap:wrap; gap:6px; font-size:12px; font-weight:750; }
.v05-name span { padding:2px 5px; border-radius:6px; color:#aca4ff; background:rgba(117,103,238,.11); font-size:8px; font-weight:850; }
.v05-name i { font-style:normal; }
.v05-volume { display:grid; grid-template-columns:70px 1fr 45px; gap:8px; align-items:center; margin:9px 0; color:#747f94; font-size:9px; }
.v05-volume input { width:100%; }
.v05-volume b { text-align:right; color:#adb5c5; }
.v05-actions { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 0; }
.v05-actions .danger { color:#ffadb6; border-color:rgba(255,100,115,.15); background:var(--red-soft); }
#v05AclFields { display:grid; gap:10px; padding:18px 22px 0; }
#v05AclFields label { display:grid; grid-template-columns:130px 1fr; gap:10px; align-items:center; color:#8b96a9; font-size:10px; }
#v05AclFields select { background:#111620; }
.v05-save { width:calc(100% - 44px); margin:16px 22px 22px; }
.v05-empty { padding:24px; text-align:center; color:#6f7a90; }

/* OWNER */
.modal { position:fixed; inset:0; z-index:35000; display:grid; place-items:center; }
.modal-backdrop { position:absolute; inset:0; background:rgba(3,5,10,.8); backdrop-filter:blur(18px); }
.owner-console { position:relative; z-index:2; width:min(1040px,calc(100% - 38px)); height:min(760px,calc(100% - 38px)); overflow:hidden; border:1px solid var(--line-strong); border-radius:22px; background:linear-gradient(155deg,#121725,#090d16); box-shadow:var(--shadow); }
.owner-console-header { height:80px; display:flex; align-items:center; justify-content:space-between; padding:0 24px; border-bottom:1px solid var(--line); }
.owner-eyebrow { color:#8d83fa; font-size:8px; font-weight:900; letter-spacing:.17em; }
.owner-console h2 { margin:4px 0 0; font-size:19px; }
.owner-console-header .icon-button { width:36px; height:36px; border:1px solid var(--line); border-radius:10px; }
.owner-tabs { display:flex; gap:5px; padding:12px 18px; border-bottom:1px solid var(--line); }
.owner-tab { min-height:36px; padding:0 12px; border:1px solid transparent; border-radius:9px; color:var(--muted); background:transparent; font-size:10px; }
.owner-tab.active { color:#fff; border-color:rgba(117,103,238,.14); background:rgba(117,103,238,.1); }
#ownerContent { height:calc(100% - 135px); overflow:auto; padding:22px; }
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.stat-card { padding:20px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.025); }
.stat-value { font-size:30px; font-weight:900; }
.stat-label { margin-top:5px; color:var(--muted); font-size:10px; }
.owner-section { margin-top:16px; padding:18px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.02); }
.owner-section h3 { margin:0 0 14px; font-size:14px; }
.owner-form { display:grid; grid-template-columns:1fr 150px auto; gap:8px; }
.owner-form input, .owner-form select, .user-row select { min-height:40px; padding:0 10px; outline:0; border:1px solid var(--line); border-radius:9px; color:#e8ebf2; background:#090d15; }
.owner-form button, .small-button { min-height:40px; padding:0 13px; border:0; border-radius:9px; color:#fff; background:#6759df; }
.invite-row, .user-row, .audit-row { display:grid; gap:10px; align-items:center; padding:11px 4px; border-bottom:1px solid var(--line); font-size:10px; }
.invite-row { grid-template-columns:1fr 160px 120px; }
.invite-code { color:#c2bdff; font-family:ui-monospace,monospace; }
.user-row { grid-template-columns:1fr 220px 90px; }
.audit-row { grid-template-columns:150px 150px 1fr; color:#8b96aa; }
.audit-action { color:#d6dbea; font-weight:750; }
.danger-button { min-height:34px; border:1px solid rgba(255,100,115,.2); border-radius:8px; color:#ff9fa9; background:rgba(255,100,115,.07); }

/* RESPONSIVE */
@media (max-width: 1320px) {
  .app { grid-template-columns:72px 290px minmax(470px,1fr); }
  .members { display:none; }
}
@media (max-width: 980px) {
  .app { grid-template-columns:68px 270px minmax(0,1fr); }
  .composer-tools { display:none; }
  .brill-voice-card { grid-template-columns:auto minmax(0,1fr); }
  .brill-voice-card .voice-join { grid-column:1 / -1; justify-self:start; }
  .voice-controls { grid-template-columns:1fr 1fr; }
  .voice-device { grid-column:1 / -1; }
  .voice-control.danger { grid-column:1 / -1; }
}
@media (max-width: 760px) {
  .mobile-only { display:grid !important; }
  .auth-screen { display:block; overflow:auto; }
  .auth-showcase { padding:26px 24px 8px; border-right:0; }
  .auth-hero, .auth-footnote { display:none; }
  .auth-form-side { padding:16px 18px 34px; }
  .auth-card { width:min(440px,100%); }
  .app { display:grid; grid-template-columns:1fr; }
  .server-rail, .members { display:none; }
  .sidebar { position:fixed; z-index:100; left:0; top:0; bottom:0; width:min(320px,90vw); transform:translateX(-105%); transition:transform .2s ease; box-shadow:24px 0 80px rgba(0,0,0,.46); }
  body.sidebar-open .sidebar { transform:translateX(0); }
  .chat-header { padding:0 12px; }
  .header-actions .online-counter { display:none; }
  .owner-button { padding:0 8px; font-size:8px; }
  .messages { padding:20px 10px 12px; }
  .message { grid-template-columns:42px minmax(0,1fr); gap:10px; padding:9px 7px; }
  .message-avatar { width:39px; height:39px; border-radius:12px; }
  .typing { width:calc(100% - 20px); padding-left:7px; }
  .composer-wrap { padding:0 10px 11px; }
  .message-v03-actions { opacity:1; }
  .brill-voice { padding:16px 12px 12px; }
  .brill-voice-card { grid-template-columns:1fr; gap:15px; min-height:0; padding:48px 22px 22px; text-align:center; }
  .brill-voice-card::after { left:50%; transform:translateX(-50%); white-space:nowrap; }
  .brill-voice-logo { width:72px; height:72px; margin:auto; border-radius:22px; }
  .voice-join { justify-self:stretch !important; width:100%; }
  .voice-users { grid-template-columns:1fr 1fr; }
  .voice-controls { grid-template-columns:1fr 1fr; }
  .voice-device, .voice-control.danger { grid-column:1 / -1; }
  .v04-overlay { padding:0; }
  .v04-modal { width:100%; height:100%; max-height:none; border-radius:0; }
  .v04-modal-body { max-height:calc(100vh - 72px); }
  .v04-search { grid-template-columns:1fr; }
  .v04-row { align-items:flex-start; flex-direction:column; }
  .v05-overlay { padding:8px; align-items:flex-end; }
  .v05-panel { width:100%; max-height:92vh; border-radius:20px 20px 8px 8px; }
  #v05AclFields label { grid-template-columns:1fr; }
  .stats-grid { grid-template-columns:1fr; }
  .owner-form, .invite-row, .user-row, .audit-row { grid-template-columns:1fr; }
}
@media (max-width: 520px) {
  .channel-symbol { width:34px; height:34px; min-width:34px; }
  .channel-description { display:none; }
  .channel-title { font-size:14px; }
  .header-actions .v04-header-button:nth-of-type(n+3) { display:none; }
  .voice-users { grid-template-columns:1fr; }
  .composer { border-radius:14px; }
}

/* Voice v2 detail polish */
.brill-voice-logo svg { width:36px; height:36px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.voice-room-empty { position:relative; z-index:1; width:min(1080px,100%); display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px; align-items:center; margin:0 auto; padding:22px 24px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(145deg,rgba(255,255,255,.022),rgba(255,255,255,.012)); }
.voice-room-empty-head span { color:#7770e8; font-size:8px; font-weight:900; letter-spacing:.15em; }
.voice-room-empty-head strong { display:block; margin-top:7px; color:#e9ecf5; font-size:16px; letter-spacing:-.01em; }
.voice-room-empty-head p { max-width:650px; margin:6px 0 0; color:#6f7a90; font-size:11px; line-height:1.55; }
.voice-room-capabilities { display:grid; grid-template-columns:repeat(3,auto); gap:8px; }
.voice-room-capabilities > div { min-width:112px; padding:12px 13px; border:1px solid var(--line); border-radius:12px; background:#10151f; }
.voice-room-capabilities b { display:block; color:#d7d3ff; font-size:9px; letter-spacing:.11em; }
.voice-room-capabilities span { display:block; margin-top:4px; color:#606c82; font-size:8px; }
.voice-dock-actions button { display:flex; align-items:center; justify-content:center; gap:5px; }
.voice-dock-actions button svg { width:13px; height:13px; flex:0 0 13px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.voice-dock-actions button span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
@media (max-width: 980px) {
  .voice-room-empty { grid-template-columns:1fr; }
  .voice-room-capabilities { grid-template-columns:repeat(3,1fr); }
  .voice-room-capabilities > div { min-width:0; }
}
@media (max-width: 620px) {
  .voice-room-capabilities { grid-template-columns:1fr; }
}

/* Role identity */
.message[data-author-role="OWNER"] .message-avatar,
.member[data-role="OWNER"] .member-avatar { border-color:rgba(154,140,255,.32); color:#e7e3ff; background:linear-gradient(145deg,rgba(117,103,238,.27),#171d2b); }
.message[data-author-role="OWNER"] .message-role { color:#c7c0ff; border-color:rgba(154,140,255,.28); background:rgba(117,103,238,.11); }
.member[data-role="OWNER"] .member-name { color:#cfc9ff; }
.message[data-author-role="PROJECT_ADMIN"] .message-role,
.message[data-author-role="SERVER_ADMIN"] .message-role,
.message[data-author-role="DEPUTY_ADMIN"] .message-role { color:#9cd7ff; border-color:rgba(93,181,255,.2); background:rgba(93,181,255,.07); }
.message[data-author-role="MODERATOR"] .message-role { color:#95edc0; border-color:rgba(75,226,154,.18); background:rgba(75,226,154,.065); }
.notification-button { min-height:34px; padding:0 10px; border:1px solid var(--line); border-radius:9px; color:#8994a8; background:rgba(255,255,255,.025); font-size:9px; }
.notification-button:hover { color:#fff; border-color:rgba(117,103,238,.2); }
.notification-enabled { color:#7cebb2; border-color:rgba(75,226,154,.18); background:rgba(75,226,154,.07); }
.empty-icon svg { width:27px; height:27px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.message-delete svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.online-counter span { white-space:nowrap; }


/* =========================================================
   BRILL CONNECT v0.6 · SERVER STRUCTURE MANAGER
   ========================================================= */

.channel-category-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:30px;
  padding:13px 8px 4px 9px;
}

.channel-category-row .channel-category {
  flex:1;
  padding:0;
  margin:0;
}

.channel-category-add {
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid transparent;
  border-radius:7px;
  color:#6f7c98;
  background:transparent;
  font-size:17px;
  line-height:1;
  cursor:pointer;
}

.channel-category-add:hover {
  color:#fff;
  border-color:rgba(125,108,255,.25);
  background:rgba(125,108,255,.1);
}

.channel-limit {
  margin-left:auto;
  color:#4f5a70;
  font-size:9px;
  font-weight:800;
  letter-spacing:.02em;
}

.sidebar-structure-actions {
  padding:10px 8px 18px;
}

.sidebar-structure-actions button {
  width:100%;
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  padding:0 10px;
  border:1px dashed rgba(125,108,255,.17);
  border-radius:9px;
  color:#66718a;
  background:rgba(125,108,255,.025);
  font-size:10px;
  font-weight:750;
  cursor:pointer;
}

.sidebar-structure-actions button:hover {
  color:#c6c0ff;
  border-color:rgba(125,108,255,.34);
  background:rgba(125,108,255,.07);
}

.structure-manager {
  display:flex;
  flex-direction:column;
  gap:14px;
}

.structure-hero {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:20px;
  border:1px solid var(--line);
  border-radius:16px;
  background:
    radial-gradient(circle at 85% 0%, rgba(116,98,238,.12), transparent 42%),
    rgba(255,255,255,.018);
}

.structure-hero h3 {
  margin:5px 0 6px;
  color:#f6f7fc;
  font-size:18px;
}

.structure-hero p {
  max-width:610px;
  margin:0;
  color:#7b869d;
  font-size:11px;
  line-height:1.6;
}

.structure-kicker {
  color:#7669d9;
  font-size:8px;
  font-weight:900;
  letter-spacing:.16em;
}

.structure-hero-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}

.structure-primary,
.structure-secondary,
.structure-danger {
  min-height:38px;
  padding:0 13px;
  border-radius:9px;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}

.structure-primary {
  border:1px solid rgba(143,128,255,.28);
  color:#fff;
  background:linear-gradient(135deg,#6557dc,#8373ef);
}

.structure-primary.voice {
  border-color:rgba(62,216,145,.18);
  color:#caffdf;
  background:rgba(62,216,145,.08);
}

.structure-secondary {
  border:1px solid var(--line);
  color:#a8b1c4;
  background:#0a0e17;
}

.structure-danger {
  border:1px solid rgba(255,94,111,.22);
  color:#ff9ba6;
  background:rgba(255,94,111,.08);
}

.structure-primary:disabled,
.structure-secondary:disabled,
.structure-danger:disabled {
  opacity:.45;
  cursor:not-allowed;
}

.structure-legend {
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 4px;
  color:#566078;
  font-size:9px;
  font-weight:700;
}

.drag-dot {
  display:inline-block;
  width:6px;
  height:6px;
  margin-right:6px;
  border-radius:50%;
  background:#7365e9;
  box-shadow:0 0 12px rgba(115,101,233,.45);
}

.structure-board {
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-bottom:20px;
}

.structure-category-card {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:15px;
  background:#090d16;
  transition:border-color .14s ease, opacity .14s ease, transform .14s ease;
}

.structure-category-card.dragging,
.structure-channel-row.dragging {
  opacity:.42;
}

.structure-category-card:hover {
  border-color:rgba(255,255,255,.095);
}

.structure-category-head {
  min-height:62px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(90deg,rgba(116,98,238,.035),transparent 42%);
}

.structure-drag-handle,
.structure-row-grip {
  color:#3d475d;
  font-size:18px;
  cursor:grab;
  user-select:none;
}

.structure-drag-handle:active,
.structure-row-grip:active {
  cursor:grabbing;
}

.structure-category-meta {
  min-width:0;
  display:grid;
  gap:2px;
}

.structure-category-meta span {
  color:#4f5b74;
  font-size:7px;
  font-weight:900;
  letter-spacing:.15em;
}

.structure-category-meta strong {
  color:#dfe3ee;
  font-size:12px;
  letter-spacing:.02em;
}

.structure-category-meta small {
  color:#4f596f;
  font-size:8px;
}

.structure-category-actions {
  margin-left:auto;
  display:flex;
  gap:5px;
}

.structure-category-actions button {
  min-width:31px;
  height:31px;
  padding:0 8px;
  border:1px solid var(--line);
  border-radius:8px;
  color:#778299;
  background:#0d121d;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}

.structure-category-actions button:hover,
.structure-row-actions button:hover {
  color:#fff;
  border-color:rgba(125,108,255,.24);
  background:rgba(125,108,255,.08);
}

.structure-category-actions button.danger:hover,
.structure-row-actions button.danger:hover {
  color:#ff9ba6;
  border-color:rgba(255,94,111,.24);
  background:rgba(255,94,111,.07);
}

.structure-channel-list {
  min-height:50px;
  padding:7px;
}

.structure-empty {
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed rgba(255,255,255,.05);
  border-radius:9px;
  color:#3f495e;
  font-size:9px;
}

.structure-channel-row {
  min-height:52px;
  display:grid;
  grid-template-columns:22px 32px minmax(0,1fr) auto auto;
  align-items:center;
  gap:9px;
  margin:3px 0;
  padding:7px 9px;
  border:1px solid transparent;
  border-radius:10px;
  background:rgba(255,255,255,.012);
}

.structure-channel-row:hover {
  border-color:rgba(255,255,255,.055);
  background:rgba(255,255,255,.025);
}

.structure-row-icon {
  width:31px;
  height:31px;
  display:grid;
  place-items:center;
  border:1px solid rgba(125,108,255,.12);
  border-radius:8px;
  color:#8d7fff;
  background:rgba(125,108,255,.07);
  font-size:15px;
  font-weight:850;
}

.structure-row-icon.voice {
  color:#64db9e;
  border-color:rgba(70,219,140,.12);
  background:rgba(70,219,140,.06);
}

.structure-row-main {
  min-width:0;
  display:grid;
  gap:3px;
}

.structure-row-main strong {
  overflow:hidden;
  color:#d8ddea;
  font-size:11px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.structure-row-main span {
  overflow:hidden;
  color:#4f5a70;
  font-size:8px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.structure-row-type {
  padding:4px 7px;
  border:1px solid rgba(125,108,255,.12);
  border-radius:999px;
  color:#7469bf;
  background:rgba(125,108,255,.045);
  font-size:7px;
  font-weight:900;
  letter-spacing:.08em;
}

.structure-row-type.voice {
  color:#5cae84;
  border-color:rgba(70,219,140,.12);
  background:rgba(70,219,140,.04);
}

.structure-row-actions {
  display:flex;
  gap:5px;
}

.structure-row-actions button {
  min-height:30px;
  padding:0 9px;
  border:1px solid var(--line);
  border-radius:8px;
  color:#6e7a91;
  background:#0b1019;
  font-size:8px;
  font-weight:800;
  cursor:pointer;
}

.structure-notice {
  position:sticky;
  top:0;
  z-index:5;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  color:#aeb7ca;
  background:#101621;
  font-size:10px;
  font-weight:700;
}

.structure-notice.success {
  color:#baffd6;
  border-color:rgba(70,219,140,.2);
  background:#0d1b17;
}

.structure-notice.error,
.structure-form-error {
  color:#ffabb4;
  border-color:rgba(255,94,111,.2);
  background:#1a1015;
}

.structure-dialog-layer {
  position:fixed;
  inset:0;
  z-index:70000;
  display:grid;
  place-items:center;
  padding:20px;
}

.structure-dialog-backdrop {
  position:absolute;
  inset:0;
  background:rgba(3,5,10,.82);
  backdrop-filter:blur(18px);
}

.structure-dialog {
  position:relative;
  z-index:2;
  width:min(690px,100%);
  max-height:min(820px,calc(100vh - 38px));
  overflow:hidden;
  border:1px solid rgba(255,255,255,.1);
  border-radius:18px;
  background:linear-gradient(155deg,#121725,#090d16);
  box-shadow:0 32px 100px rgba(0,0,0,.55);
}

.structure-dialog > header {
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
}

.structure-dialog > header span {
  color:#685dc0;
  font-size:7px;
  font-weight:900;
  letter-spacing:.15em;
}

.structure-dialog > header h3 {
  margin:4px 0 0;
  color:#f3f5fb;
  font-size:16px;
}

.structure-dialog-close {
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:9px;
  color:#78839a;
  background:#0b1019;
  font-size:20px;
  cursor:pointer;
}

.structure-dialog-body {
  max-height:calc(100vh - 150px);
  overflow:auto;
  padding:18px;
}

.structure-form {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.structure-field {
  display:grid;
  gap:6px;
}

.structure-field.full,
.structure-form-actions.full,
.structure-form-error.full,
.structure-type-badge.full,
.structure-form-divider.full,
.structure-danger-copy.full {
  grid-column:1 / -1;
}

.structure-field > span,
.structure-form-divider span {
  color:#5b6680;
  font-size:8px;
  font-weight:850;
  letter-spacing:.1em;
}

.structure-field input,
.structure-field select {
  width:100%;
  min-height:42px;
  padding:0 11px;
  outline:none;
  border:1px solid var(--line);
  border-radius:9px;
  color:#e4e8f2;
  background:#080c14;
  font-size:11px;
}

.structure-field input:focus,
.structure-field select:focus {
  border-color:rgba(125,108,255,.38);
  box-shadow:0 0 0 2px rgba(125,108,255,.06);
}

.structure-form-divider {
  position:relative;
  margin:3px 0 -1px;
  padding-top:11px;
  border-top:1px solid var(--line);
}

.structure-type-badge {
  width:max-content;
  padding:5px 8px;
  border:1px solid rgba(125,108,255,.13);
  border-radius:999px;
  color:#8174d9;
  background:rgba(125,108,255,.05);
  font-size:7px;
  font-weight:900;
  letter-spacing:.1em;
}

.structure-type-badge.voice {
  color:#61bd8d;
  border-color:rgba(70,219,140,.13);
  background:rgba(70,219,140,.045);
}

.structure-form-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding-top:6px;
}

.structure-form-error {
  padding:9px 11px;
  border:1px solid rgba(255,94,111,.18);
  border-radius:9px;
  font-size:9px;
  font-weight:700;
}

.structure-danger-copy {
  padding:13px;
  border:1px solid rgba(255,94,111,.13);
  border-radius:10px;
  background:rgba(255,94,111,.04);
}

.structure-danger-copy strong {
  color:#ffadb6;
  font-size:11px;
}

.structure-danger-copy p {
  margin:5px 0 0;
  color:#7d6871;
  font-size:9px;
  line-height:1.55;
}

@media (max-width: 920px) {
  .structure-hero {
    align-items:flex-start;
    flex-direction:column;
  }

  .structure-hero-actions {
    justify-content:flex-start;
  }

  .structure-channel-row {
    grid-template-columns:18px 30px minmax(0,1fr) auto;
  }

  .structure-row-type {
    display:none;
  }
}

@media (max-width: 620px) {
  .structure-form {
    grid-template-columns:1fr;
  }

  .structure-field.full,
  .structure-form-actions.full,
  .structure-form-error.full,
  .structure-type-badge.full,
  .structure-form-divider.full,
  .structure-danger-copy.full {
    grid-column:auto;
  }

  .structure-legend {
    align-items:flex-start;
    flex-direction:column;
  }

  .structure-category-head {
    flex-wrap:wrap;
  }

  .structure-category-actions {
    width:100%;
    margin-left:32px;
  }

  .structure-channel-row {
    grid-template-columns:18px 30px minmax(0,1fr);
  }

  .structure-row-actions {
    grid-column:2 / -1;
    justify-content:flex-end;
  }
}

/* =============================================================
   BRILL CONNECT v0.7 · ROLES & PERMISSIONS MANAGER
   ============================================================= */

.roles-manager {
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:18px 20px 28px;
}

.roles-hero {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  padding:20px 22px;
  border:1px solid rgba(124,109,242,.17);
  border-radius:16px;
  background:
    radial-gradient(circle at 0 0,rgba(124,109,242,.12),transparent 42%),
    linear-gradient(145deg,rgba(255,255,255,.026),rgba(255,255,255,.012));
}

.roles-hero h3 {
  margin:6px 0 7px;
  font-size:18px;
  letter-spacing:-.02em;
}

.roles-hero p {
  max-width:690px;
  margin:0;
  color:var(--muted);
  font-size:11px;
  line-height:1.6;
}

.roles-kicker {
  color:#978cff;
  font-size:8px;
  font-weight:900;
  letter-spacing:.17em;
}

.roles-system-note {
  display:grid;
  gap:5px;
  padding:13px 16px;
  border:1px solid rgba(72,218,143,.12);
  border-radius:12px;
  background:rgba(72,218,143,.035);
}

.roles-system-note strong {
  color:#bdf8d8;
  font-size:10px;
}

.roles-system-note span {
  color:var(--muted);
  font-size:9px;
  line-height:1.55;
}

.roles-layout {
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(330px,.95fr);
  gap:14px;
  min-height:430px;
}

.roles-panel {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:15px;
  background:rgba(255,255,255,.018);
}

.roles-panel > header {
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.014);
}

.roles-panel > header > div {
  display:grid;
  gap:4px;
}

.roles-panel > header span {
  color:var(--dim);
  font-size:8px;
  font-weight:900;
  letter-spacing:.15em;
}

.roles-panel > header strong {
  font-size:12px;
}

.roles-panel > header small {
  color:var(--dim);
  font-size:8px;
}

.roles-list,
.role-user-list {
  max-height:490px;
  overflow:auto;
  padding:8px;
}

.role-manager-row {
  --role-color:#7C6DF2;
  display:grid;
  grid-template-columns:24px 14px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  min-height:76px;
  padding:11px 11px;
  margin:2px 0;
  border:1px solid transparent;
  border-radius:11px;
  background:rgba(255,255,255,.014);
  transition:.15s ease;
}

.role-manager-row:hover {
  border-color:color-mix(in srgb,var(--role-color) 28%,transparent);
  background:color-mix(in srgb,var(--role-color) 5%,rgba(255,255,255,.018));
}

.role-manager-row.dragging {
  opacity:.48;
  transform:scale(.99);
}

.role-drag {
  color:var(--dim);
  font-size:14px;
  cursor:grab;
}

.role-drag:active { cursor:grabbing; }

.role-swatch {
  width:11px;
  height:30px;
  border-radius:999px;
  background:var(--role-color);
  box-shadow:0 0 18px color-mix(in srgb,var(--role-color) 24%,transparent);
}

.role-row-main {
  min-width:0;
  display:grid;
  gap:4px;
}

.role-row-main > strong {
  color:var(--role-color);
  font-size:12px;
}

.role-row-main > span {
  color:var(--muted);
  font-size:9px;
}

.role-permission-chips,
.role-user-tags {
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin-top:2px;
}

.role-permission-chips i {
  padding:3px 6px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:999px;
  color:var(--dim);
  background:rgba(255,255,255,.025);
  font-size:7px;
  font-style:normal;
}

.role-row-edit,
.role-primary,
.role-secondary,
.role-danger {
  min-height:36px;
  padding:0 12px;
  border-radius:9px;
  font-size:9px;
  font-weight:800;
  transition:.15s ease;
}

.role-row-edit,
.role-secondary {
  border:1px solid var(--line);
  color:#d9deef;
  background:rgba(255,255,255,.03);
}

.role-row-edit:hover,
.role-secondary:hover {
  border-color:rgba(124,109,242,.24);
  color:#fff;
  background:rgba(124,109,242,.08);
}

.role-primary {
  border:1px solid rgba(154,140,255,.2);
  color:#fff;
  background:linear-gradient(135deg,#6558dc,#8172f3);
  box-shadow:0 10px 24px rgba(101,88,220,.15);
}

.role-primary:hover { filter:brightness(1.08); transform:translateY(-1px); }

.role-danger {
  border:1px solid rgba(255,92,107,.18);
  color:#ff9ca6;
  background:rgba(255,92,107,.065);
}

.role-danger:hover {
  color:#fff;
  background:rgba(255,92,107,.14);
}

.role-user-row {
  display:grid;
  grid-template-columns:38px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  min-height:68px;
  padding:9px 9px;
  margin:2px 0;
  border:1px solid transparent;
  border-radius:11px;
}

.role-user-row:hover {
  border-color:rgba(255,255,255,.055);
  background:rgba(255,255,255,.025);
}

.role-user-avatar,
.role-assignment-avatar {
  display:flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border:1px solid rgba(124,109,242,.18);
  border-radius:11px;
  color:#dedaff;
  background:linear-gradient(145deg,rgba(124,109,242,.2),rgba(124,109,242,.08));
  font-size:9px;
  font-weight:900;
}

.role-user-main {
  min-width:0;
  display:grid;
  gap:3px;
}

.role-user-main > strong { font-size:10px; }
.role-user-main > span { color:var(--dim); font-size:8px; }

.role-user-tags i {
  --tag-color:#7C6DF2;
  padding:3px 6px;
  border:1px solid color-mix(in srgb,var(--tag-color) 24%,transparent);
  border-radius:999px;
  color:var(--tag-color);
  background:color-mix(in srgb,var(--tag-color) 8%,transparent);
  font-size:7px;
  font-style:normal;
}

.role-user-tags em {
  color:var(--dim);
  font-size:7px;
  font-style:normal;
}

.role-empty {
  display:grid;
  gap:5px;
  padding:16px;
  color:var(--muted);
  text-align:center;
}

.role-empty.large { padding:58px 24px; }
.role-empty strong { color:#e9ecf6; font-size:11px; }
.role-empty span { color:var(--dim); font-size:9px; }

.role-dialog-layer {
  position:fixed;
  inset:0;
  z-index:60000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.role-dialog-backdrop {
  position:absolute;
  inset:0;
  background:rgba(2,4,9,.82);
  backdrop-filter:blur(18px);
}

.role-dialog {
  position:relative;
  z-index:2;
  width:min(760px,calc(100vw - 32px));
  max-height:min(820px,calc(100dvh - 32px));
  overflow:hidden;
  border:1px solid rgba(255,255,255,.09);
  border-radius:20px;
  background:linear-gradient(150deg,#141a29,#090d16);
  box-shadow:0 34px 100px rgba(0,0,0,.55);
}

.role-dialog > header {
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 21px;
  border-bottom:1px solid var(--line);
}

.role-dialog > header > div { display:grid; gap:4px; }
.role-dialog > header span { color:#8d83fa; font-size:8px; font-weight:900; letter-spacing:.16em; }
.role-dialog > header h3 { margin:0; font-size:16px; }

.role-dialog-close {
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:9px;
  color:var(--muted);
  background:rgba(255,255,255,.025);
  font-size:18px;
}

.role-dialog-close:hover { color:#fff; background:rgba(255,255,255,.06); }

.role-dialog-body {
  max-height:calc(100dvh - 150px);
  overflow:auto;
  padding:18px 20px 20px;
}

.role-form { display:grid; gap:16px; }

.role-editor-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(210px,.65fr);
  gap:12px;
}

.role-field {
  display:grid;
  align-content:start;
  gap:7px;
}

.role-field > span,
.role-form-divider span {
  color:var(--dim);
  font-size:8px;
  font-weight:900;
  letter-spacing:.13em;
}

.role-field > small {
  color:var(--dim);
  font-size:8px;
  line-height:1.45;
}

.role-field input:not([type="color"]),
.role-field select {
  width:100%;
  min-height:42px;
  padding:0 11px;
  outline:0;
  border:1px solid var(--line);
  border-radius:10px;
  color:#eef0f7;
  background:#090d15;
}

.role-field input:focus,
.role-field select:focus { border-color:rgba(124,109,242,.35); }

.role-color-field > div {
  min-height:42px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#090d15;
}

.role-color-field input[type="color"] {
  width:34px;
  height:30px;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:7px;
  background:transparent;
}

.role-color-field code { color:var(--muted); font-size:9px; }

.role-hoist-card,
.role-permission-card {
  position:relative;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-height:68px;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:11px;
  background:rgba(255,255,255,.018);
  cursor:pointer;
}

.role-hoist-card input,
.role-permission-card input,
.role-assignment-item input {
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.role-permission-toggle {
  position:relative;
  width:31px;
  height:18px;
  border-radius:999px;
  background:#252b3b;
  transition:.15s ease;
}

.role-permission-toggle::after {
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:12px;
  height:12px;
  border-radius:50%;
  background:#858da3;
  transition:.15s ease;
}

.role-hoist-card input:checked + .role-permission-toggle,
.role-permission-card input:checked + .role-permission-toggle {
  background:#6759df;
}

.role-hoist-card input:checked + .role-permission-toggle::after,
.role-permission-card input:checked + .role-permission-toggle::after {
  left:16px;
  background:white;
}

.role-hoist-card > span:last-child,
.role-permission-copy {
  display:grid;
  gap:4px;
}

.role-hoist-card strong,
.role-permission-copy strong { font-size:9px; }
.role-hoist-card small,
.role-permission-copy small { color:var(--dim); font-size:8px; line-height:1.4; }

.role-form-divider {
  height:1px;
  display:flex;
  align-items:center;
  margin:4px 0;
  background:var(--line);
}

.role-form-divider span {
  padding-right:8px;
  background:#0d121e;
}

.role-permissions-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.role-form-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:5px;
}

.role-form-actions > div { display:flex; gap:7px; }
.role-form-actions.compact { margin-top:13px; }

.role-form-error {
  padding:10px 11px;
  border:1px solid rgba(255,91,106,.17);
  border-radius:9px;
  color:#ff9ea7;
  background:rgba(255,91,106,.06);
  font-size:9px;
}

.role-assignment-form { display:grid; gap:13px; }

.role-assignment-user {
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:10px;
  align-items:center;
  padding:11px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.02);
}

.role-assignment-user > div:last-child { display:grid; gap:4px; }
.role-assignment-user strong { font-size:11px; }
.role-assignment-user span { color:var(--dim); font-size:8px; }

.role-assignment-list {
  display:grid;
  gap:6px;
  max-height:380px;
  overflow:auto;
}

.role-assignment-item {
  --role-color:#7C6DF2;
  position:relative;
  display:grid;
  grid-template-columns:14px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-height:54px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(255,255,255,.015);
  cursor:pointer;
}

.role-assignment-item:has(input:checked) {
  border-color:rgba(124,109,242,.25);
  background:rgba(124,109,242,.055);
}

.role-color-dot {
  width:11px;
  height:11px;
  border-radius:50%;
  background:var(--role-color);
  box-shadow:0 0 12px color-mix(in srgb,var(--role-color) 25%,transparent);
}

.role-assignment-item > span:last-child { display:grid; gap:3px; }
.role-assignment-item strong { font-size:9px; }
.role-assignment-item small { color:var(--dim); font-size:8px; }

.member-avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
}

@media (max-width: 980px) {
  .roles-layout { grid-template-columns:1fr; }
  .roles-list,.role-user-list { max-height:380px; }
}

@media (max-width: 700px) {
  .roles-manager { padding:12px; }
  .roles-hero { flex-direction:column; }
  .roles-hero .role-primary { width:100%; }
  .role-editor-grid,
  .role-permissions-grid { grid-template-columns:1fr; }
  .role-dialog-layer { padding:7px; align-items:flex-end; }
  .role-dialog { width:100%; max-height:94dvh; border-radius:18px 18px 7px 7px; }
}

/* v0.7 owner navigation can contain six control sections. */
.owner-tabs {
  overflow-x:auto;
  overflow-y:hidden;
  flex-wrap:nowrap;
  scrollbar-width:none;
}
.owner-tabs::-webkit-scrollbar { display:none; }
.owner-tab { flex:0 0 auto; white-space:nowrap; }

/* =========================================================
   BRILL CONNECT v0.9 · AUTOMOD & SECURITY
   ========================================================= */

.moderation-button {
  height:34px;
  padding:0 12px;
  border:1px solid rgba(70,219,140,.2);
  border-radius:10px;
  color:#9cf0c3;
  background:rgba(70,219,140,.065);
  font-size:9px;
  font-weight:850;
  letter-spacing:.07em;
}
.moderation-button:hover {
  border-color:rgba(70,219,140,.36);
  background:rgba(70,219,140,.11);
}

.moderation-console {
  position:relative;
  z-index:2;
  width:min(1180px,calc(100% - 38px));
  height:min(820px,calc(100% - 38px));
  overflow:hidden;
  border:1px solid var(--line-strong);
  border-radius:22px;
  background:linear-gradient(155deg,#121725,#090d16);
  box-shadow:var(--shadow);
}
.moderation-console-header {
  height:80px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
  border-bottom:1px solid var(--line);
}
.moderation-console-header h2 {
  margin:4px 0 0;
  font-size:19px;
}
.moderation-console-header .icon-button {
  width:36px;
  height:36px;
  border:1px solid var(--line);
  border-radius:10px;
}
.moderation-tabs {
  display:flex;
  gap:5px;
  padding:12px 18px;
  overflow-x:auto;
  border-bottom:1px solid var(--line);
}
.moderation-tab {
  flex:0 0 auto;
  min-height:36px;
  padding:0 12px;
  border:1px solid transparent;
  border-radius:9px;
  color:var(--muted);
  background:transparent;
  font-size:10px;
  white-space:nowrap;
}
.moderation-tab.active {
  color:#d9fff0;
  border-color:rgba(70,219,140,.15);
  background:rgba(70,219,140,.08);
}
#moderationContent {
  height:calc(100% - 137px);
  overflow:auto;
  padding:18px;
}
.mod-loading,
.mod-empty {
  color:#6e788c;
  font-size:11px;
}
.mod-empty.large {
  min-height:240px;
  display:grid;
  place-items:center;
  border:1px dashed var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.015);
}

.mod-hero {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  padding:22px;
  border:1px solid rgba(70,219,140,.11);
  border-radius:18px;
  background:
    radial-gradient(circle at 85% 0%,rgba(70,219,140,.08),transparent 34%),
    linear-gradient(145deg,rgba(18,25,35,.96),rgba(10,14,22,.96));
}
.mod-hero > div:first-child > span,
.mod-section-head > div > span,
.mod-panel > header > span {
  color:#55d797;
  font-size:8px;
  font-weight:900;
  letter-spacing:.15em;
}
.mod-hero h3,
.mod-section-head h3 {
  margin:7px 0 4px;
  color:#f5f7ff;
  font-size:18px;
  letter-spacing:-.02em;
}
.mod-hero p,
.mod-section-head p {
  margin:0;
  color:#778297;
  font-size:10px;
  line-height:1.55;
}
.mod-live {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:7px;
  height:34px;
  padding:0 12px;
  border:1px solid rgba(70,219,140,.13);
  border-radius:999px;
  color:#81e9b1;
  background:rgba(70,219,140,.055);
  font-size:8px;
  font-weight:900;
  letter-spacing:.1em;
}
.mod-live i {
  width:7px;
  height:7px;
  border-radius:50%;
  background:#46db8c;
  box-shadow:0 0 12px rgba(70,219,140,.6);
}

.mod-stats {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.mod-stats article {
  min-height:92px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:15px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.02);
}
.mod-stats span {
  color:#6d788d;
  font-size:9px;
}
.mod-stats strong {
  color:#f4f6ff;
  font-size:25px;
  letter-spacing:-.04em;
}
.mod-grid-two {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}
.mod-panel {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:15px;
  background:rgba(255,255,255,.018);
}
.mod-panel > header {
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:15px 16px;
  border-bottom:1px solid var(--line);
}
.mod-panel > header strong {
  font-size:12px;
}
.mod-mini-list {
  padding:7px;
}
.mod-mini-list button {
  width:100%;
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:10px;
  color:#cdd3e0;
  background:transparent;
  text-align:left;
}
.mod-mini-list button:hover {
  border-color:var(--line);
  background:rgba(255,255,255,.025);
}
.mod-mini-list button div {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.mod-mini-list button strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
}
.mod-mini-list button span,
.mod-mini-list button i {
  color:#68748a;
  font-size:9px;
  font-style:normal;
}
.mod-mini-list .mod-empty {
  padding:22px 10px;
  text-align:center;
}

.mod-section-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:14px;
  padding:4px 2px 12px;
  border-bottom:1px solid var(--line);
}
.mod-counter {
  flex:0 0 auto;
  padding:7px 10px;
  border:1px solid rgba(117,103,238,.15);
  border-radius:999px;
  color:#bcb4ff;
  background:rgba(117,103,238,.065);
  font-size:8px;
  font-weight:850;
  letter-spacing:.08em;
}
.mod-search input {
  width:230px;
  height:36px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:10px;
  outline:0;
  color:#eef1fa;
  background:#0c111b;
  font-size:10px;
}
.mod-search input:focus {
  border-color:rgba(117,103,238,.3);
}

.mod-report-list,
.mod-case-list,
.mod-user-list,
.mod-channel-list {
  display:flex;
  flex-direction:column;
  gap:8px;
}
.mod-report-card {
  overflow:hidden;
  border:1px solid rgba(255,100,115,.13);
  border-radius:15px;
  background:linear-gradient(145deg,rgba(255,100,115,.025),rgba(255,255,255,.014));
}
.mod-report-card.closed {
  border-color:var(--line);
  opacity:.72;
}
.mod-report-card > header {
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 14px;
  border-bottom:1px solid var(--line);
}
.mod-report-card > header > div {
  display:flex;
  align-items:center;
  gap:8px;
}
.mod-report-card strong { font-size:11px; }
.mod-report-card small,
.mod-report-card time {
  color:#68748a;
  font-size:9px;
}
.mod-report-state {
  padding:4px 7px;
  border-radius:999px;
  font-size:7px;
  font-weight:900;
  letter-spacing:.08em;
}
.mod-report-state.open {
  color:#ffafb6;
  background:rgba(255,100,115,.09);
}
.mod-report-state.resolved {
  color:#8ce8b8;
  background:rgba(70,219,140,.08);
}
.mod-report-state.dismissed {
  color:#a6afc0;
  background:rgba(255,255,255,.05);
}
.mod-report-message {
  margin:12px 14px 8px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#0a0f18;
}
.mod-report-message span {
  color:#8378ee;
  font-size:9px;
  font-weight:800;
}
.mod-report-message p {
  margin:7px 0 0;
  color:#cbd1df;
  font-size:11px;
  line-height:1.5;
}
.mod-report-meta {
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
  padding:0 14px 12px;
  color:#6e798e;
  font-size:9px;
}
.mod-report-card footer {
  display:flex;
  justify-content:flex-end;
  gap:7px;
  padding:10px 14px;
  border-top:1px solid var(--line);
}
.mod-report-card footer.resolved-note {
  justify-content:flex-start;
  color:#657187;
  font-size:9px;
}

.mod-user-row,
.mod-channel-row,
.mod-case-row {
  min-height:66px;
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:13px;
  background:rgba(255,255,255,.018);
}
.mod-user-row:hover,
.mod-channel-row:hover,
.mod-case-row:hover {
  border-color:rgba(255,255,255,.095);
  background:rgba(255,255,255,.027);
}
.mod-user-avatar,
.mod-channel-icon {
  width:39px;
  height:39px;
  flex:0 0 39px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:12px;
  color:#dbe0ed;
  background:linear-gradient(145deg,#252e42,#171d2b);
  font-size:10px;
  font-weight:900;
}
.mod-channel-icon {
  color:#9d91ff;
  font-size:18px;
}
.mod-user-main,
.mod-channel-main {
  min-width:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.mod-user-main strong,
.mod-channel-main strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
}
.mod-user-main span,
.mod-channel-main span {
  color:#657187;
  font-size:9px;
}
.mod-status {
  flex:0 0 auto;
  padding:5px 8px;
  border-radius:999px;
  font-size:8px;
  font-weight:800;
}
.mod-status.clean {
  color:#78dfaa;
  background:rgba(70,219,140,.07);
}
.mod-status.timeout {
  color:#f0c079;
  background:rgba(239,177,73,.075);
}
.mod-status.banned {
  color:#ff98a3;
  background:rgba(255,100,115,.075);
}
.mod-user-actions {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:5px;
}
.mod-user-actions button,
.mod-secondary,
.mod-primary,
.mod-danger,
.mod-danger-outline {
  min-height:32px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:8px;
  color:#aab3c5;
  background:rgba(255,255,255,.03);
  font-size:9px;
  font-weight:700;
}
.mod-user-actions button:hover,
.mod-secondary:hover {
  color:#fff;
  background:rgba(255,255,255,.06);
}
.mod-user-actions button.danger,
.mod-danger,
.mod-danger-outline {
  border-color:rgba(255,100,115,.2);
  color:#ff9aa4;
  background:rgba(255,100,115,.065);
}
.mod-primary {
  border-color:rgba(117,103,238,.28);
  color:#fff;
  background:linear-gradient(135deg,#6558dc,#8575f2);
}
.mod-danger {
  color:#fff;
  background:linear-gradient(135deg,#c84655,#e45c68);
}
.mod-danger-outline { background:rgba(255,100,115,.04); }

.mod-slowmode {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
}
.mod-slowmode span {
  color:#616d82;
  font-size:7px;
  font-weight:850;
  letter-spacing:.08em;
}
.mod-slowmode select {
  height:32px;
  min-width:105px;
  padding:0 8px;
  border:1px solid var(--line);
  border-radius:8px;
  outline:0;
  color:#b8c0d0;
  background:#0b1019;
  font-size:9px;
}

.mod-case-row {
  display:grid;
  grid-template-columns:112px minmax(0,1fr) 180px;
}
.mod-case-type {
  justify-self:start;
  padding:5px 8px;
  border:1px solid rgba(117,103,238,.14);
  border-radius:999px;
  color:#aaa1ff;
  background:rgba(117,103,238,.055);
  font-size:8px;
  font-weight:850;
}
.mod-case-row > div:nth-child(2) strong { font-size:10px; }
.mod-case-row > div:nth-child(2) p {
  margin:3px 0 0;
  color:#6c788d;
  font-size:9px;
}
.mod-case-actor {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:3px;
  color:#748096;
  font-size:9px;
}
.mod-case-actor time { color:#586479; }

.mod-action-layer {
  position:fixed;
  inset:0;
  z-index:70000;
  display:grid;
  place-items:center;
  padding:18px;
}
.mod-action-backdrop {
  position:absolute;
  inset:0;
  background:rgba(3,5,10,.84);
  backdrop-filter:blur(18px);
}
.mod-action-card {
  position:relative;
  z-index:2;
  width:min(500px,100%);
  overflow:hidden;
  border:1px solid var(--line-strong);
  border-radius:18px;
  background:linear-gradient(155deg,#141a28,#0a0e17);
  box-shadow:var(--shadow);
}
.mod-action-card > header {
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 17px;
  border-bottom:1px solid var(--line);
}
.mod-action-card > header span {
  color:#55d797;
  font-size:7px;
  font-weight:900;
  letter-spacing:.14em;
}
.mod-action-card > header h3 {
  margin:4px 0 0;
  font-size:15px;
}
.mod-action-card > header button {
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:9px;
  color:#7b8699;
  background:rgba(255,255,255,.025);
}
.mod-action-description {
  margin:0;
  padding:12px 17px 0;
  color:#758095;
  font-size:9px;
  line-height:1.55;
}
.mod-action-card form {
  display:flex;
  flex-direction:column;
  gap:11px;
  padding:15px 17px 17px;
}
.mod-action-field {
  display:flex;
  flex-direction:column;
  gap:6px;
}
.mod-action-field > span {
  color:#8a95a9;
  font-size:8px;
  font-weight:800;
}
.mod-action-field textarea,
.mod-action-field input,
.mod-action-field select {
  width:100%;
  min-height:38px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:9px;
  outline:0;
  color:#e9edf7;
  background:#0a0f18;
  font-size:10px;
}
.mod-action-field textarea {
  min-height:88px;
  resize:vertical;
}
.mod-action-field textarea:focus,
.mod-action-field input:focus,
.mod-action-field select:focus {
  border-color:rgba(117,103,238,.34);
}
.mod-action-buttons {
  display:flex;
  justify-content:flex-end;
  gap:7px;
  margin-top:3px;
}

.message-report-action {
  color:#e3a4aa !important;
}
.message-report-action:hover {
  background:rgba(255,100,115,.08) !important;
}

.mod-notice-toast {
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:80000;
  width:min(360px,calc(100% - 36px));
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:13px 14px;
  transform:translateY(15px);
  opacity:0;
  border:1px solid rgba(70,219,140,.15);
  border-radius:13px;
  background:linear-gradient(145deg,#121925,#0b1019);
  box-shadow:0 18px 50px rgba(0,0,0,.38);
  transition:.2s ease;
}
.mod-notice-toast.show {
  transform:none;
  opacity:1;
}
.mod-notice-toast strong { font-size:11px; }
.mod-notice-toast span { color:#909aab; font-size:9px; line-height:1.45; }
.mod-notice-toast small { color:#62d89c; font-size:8px; }

@media (max-width: 980px) {
  .moderation-console {
    width:100%;
    height:100%;
    border-radius:0;
  }
  .mod-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mod-grid-two { grid-template-columns:1fr; }
  .mod-user-row,
  .mod-channel-row { flex-wrap:wrap; }
  .mod-user-main,
  .mod-channel-main { min-width:180px; }
  .mod-user-actions { width:100%; padding-left:50px; }
  .mod-case-row { grid-template-columns:90px minmax(0,1fr); }
  .mod-case-actor { grid-column:2; align-items:flex-start; }
}

@media (max-width: 620px) {
  #moderationContent { padding:12px; }
  .moderation-console-header { height:68px; padding:0 14px; }
  .moderation-tabs { padding:9px 10px; }
  .mod-hero { align-items:flex-start; flex-direction:column; padding:16px; }
  .mod-stats { grid-template-columns:1fr 1fr; }
  .mod-section-head { align-items:flex-start; flex-direction:column; }
  .mod-search, .mod-search input { width:100%; }
  .mod-status { order:4; }
  .mod-user-actions { padding-left:0; flex-wrap:wrap; }
  .mod-slowmode { width:100%; justify-content:space-between; padding-left:50px; }
  .mod-danger-outline { margin-left:50px; }
}


/* =========================================================
   BRILL CONNECT v0.9 · AUTOMOD & SECURITY
   ========================================================= */

.automod-hero {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px 20px;
  border:1px solid rgba(117,103,238,.16);
  border-radius:16px;
  background:
    radial-gradient(circle at 85% 0%,rgba(117,103,238,.12),transparent 36%),
    linear-gradient(145deg,rgba(17,22,35,.96),rgba(9,13,21,.98));
}
.automod-hero h3 { margin:4px 0 5px; font-size:18px; }
.automod-hero p { margin:0; color:#8d97a9; font-size:10px; line-height:1.55; }
.automod-hero > div > span {
  color:#8d83ff;
  font-size:8px;
  font-weight:900;
  letter-spacing:.16em;
}
.automod-master {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:200px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:12px;
  background:rgba(255,255,255,.025);
}
.automod-master strong { display:block; font-size:10px; }
.automod-master small { display:block; margin-top:2px; color:#6f7889; font-size:8px; }
.automod-switch { position:relative; width:38px; height:22px; flex:0 0 auto; }
.automod-switch input { position:absolute; opacity:0; pointer-events:none; }
.automod-switch i {
  position:absolute;
  inset:0;
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  background:#171c28;
  transition:.18s ease;
}
.automod-switch i::after {
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#7f899a;
  transition:.18s ease;
}
.automod-switch input:checked + i {
  border-color:rgba(70,219,140,.3);
  background:rgba(70,219,140,.12);
}
.automod-switch input:checked + i::after {
  left:19px;
  background:#46db8c;
  box-shadow:0 0 16px rgba(70,219,140,.35);
}
.automod-settings-bar {
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:10px;
  margin-top:12px;
}
.automod-settings-bar label,
.automod-rule-field {
  display:flex;
  flex-direction:column;
  gap:5px;
  color:#727d90;
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
}
.automod-settings-bar select,
.automod-rule-field input,
.automod-rule-field select,
.automod-rule-field textarea {
  min-height:36px;
  padding:0 10px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:9px;
  outline:0;
  color:#e9edfa;
  background:#0e131e;
  font:inherit;
  letter-spacing:0;
}
.automod-rule-field textarea {
  min-height:84px;
  padding:9px 10px;
  resize:vertical;
  line-height:1.45;
}
.automod-settings-bar select:focus,
.automod-rule-field input:focus,
.automod-rule-field select:focus,
.automod-rule-field textarea:focus {
  border-color:rgba(117,103,238,.35);
}
.automod-rule-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.automod-rule-card {
  padding:14px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:14px;
  background:linear-gradient(145deg,rgba(16,21,33,.94),rgba(10,14,23,.96));
}
.automod-rule-card.wide { grid-column:1/-1; }
.automod-rule-card header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.automod-rule-card header strong { display:block; font-size:11px; }
.automod-rule-card header span { display:block; margin-top:3px; color:#6f798b; font-size:8px; line-height:1.4; }
.automod-rule-fields {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.automod-rule-card.wide .automod-rule-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
.automod-save-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.055);
}
.automod-save-row span { color:#737e90; font-size:9px; line-height:1.4; }
.automod-save {
  min-width:150px;
  height:38px;
  border:1px solid rgba(145,130,255,.28);
  border-radius:10px;
  color:#fff;
  background:linear-gradient(135deg,#6255da,#8372ef);
  font-size:9px;
  font-weight:900;
  letter-spacing:.06em;
}
.automod-save:disabled { opacity:.45; cursor:not-allowed; }
.automod-event-toolbar {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0;
}
.automod-event-toolbar select,
.automod-event-toolbar input {
  height:34px;
  padding:0 9px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:9px;
  outline:0;
  color:#e8ecf7;
  background:#0e131e;
  font-size:9px;
}
.automod-event-list { display:flex; flex-direction:column; gap:7px; }
.automod-event {
  display:grid;
  grid-template-columns:115px minmax(0,1fr) 100px;
  gap:12px;
  align-items:center;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:11px;
  background:rgba(255,255,255,.018);
}
.automod-event-rule {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:0 8px;
  border:1px solid rgba(255,177,74,.16);
  border-radius:7px;
  color:#ffc878;
  background:rgba(255,177,74,.06);
  font-size:8px;
  font-weight:900;
  letter-spacing:.06em;
}
.automod-event-main strong { display:block; font-size:10px; }
.automod-event-main span { display:block; margin-top:3px; color:#768194; font-size:8px; }
.automod-event-main p {
  margin:5px 0 0;
  overflow:hidden;
  color:#a5afc0;
  font-size:9px;
  line-height:1.4;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.automod-event-meta { text-align:right; }
.automod-event-meta strong { display:block; color:#a69cff; font-size:8px; }
.automod-event-meta time { display:block; margin-top:4px; color:#606b7d; font-size:8px; }
.mod-notice-toast.automod { border-color:rgba(255,177,74,.2); }
.mod-notice-toast.automod small { color:#ffc878; }

@media (max-width:980px) {
  .automod-rule-grid { grid-template-columns:1fr; }
  .automod-rule-card.wide { grid-column:auto; }
}
@media (max-width:620px) {
  .automod-hero { align-items:flex-start; flex-direction:column; }
  .automod-master { width:100%; }
  .automod-settings-bar,
  .automod-rule-fields,
  .automod-rule-card.wide .automod-rule-fields { grid-template-columns:1fr; }
  .automod-save-row { align-items:stretch; flex-direction:column; }
  .automod-save { width:100%; }
  .automod-event { grid-template-columns:1fr; }
  .automod-event-meta { text-align:left; }
}

/* =========================================================
   BRILL CONNECT v1.0 · NOTIFICATIONS & INBOX
   ========================================================= */

.notification-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 11px;
  color: rgba(223,228,249,.68);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: .16s ease;
}

.notification-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-button:hover,
.notification-button.has-unread {
  border-color: rgba(120,105,239,.25);
  color: #fff;
  background: rgba(120,105,239,.09);
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 3px solid #090c14;
  border-radius: 999px;
  color: #fff;
  background: #7769ef;
  box-shadow: 0 5px 14px rgba(85,68,221,.3);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.notification-console {
  position: relative;
  z-index: 2;
  width: min(860px, calc(100vw - 40px));
  height: min(760px, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 23px;
  background:
    radial-gradient(circle at 20% -10%, rgba(117,103,238,.11), transparent 32%),
    linear-gradient(145deg, #111623, #090c14 70%);
  box-shadow: 0 36px 110px rgba(0,0,0,.55);
}

.notification-console::before {
  content: "";
  position: absolute;
  inset: 0 13% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(133,119,255,.55), transparent);
}

.notification-console-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}

.notification-console-header h2 {
  margin: 4px 0 0;
  color: #f7f8ff;
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -.025em;
}

.notification-eyebrow {
  color: rgba(167,177,214,.43);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .17em;
}

.notification-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.notification-read-all,
.notification-push-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(117,103,238,.2);
  border-radius: 10px;
  color: #c6c0ff;
  background: rgba(117,103,238,.075);
  font-size: 10px;
  font-weight: 760;
  cursor: pointer;
}

.notification-read-all:hover,
.notification-push-button:hover:not(:disabled) {
  border-color: rgba(137,123,255,.34);
  color: #fff;
  background: rgba(117,103,238,.13);
}

.notification-push-button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.notification-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 5px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.008);
}

.notification-tab {
  height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: rgba(204,212,239,.53);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.notification-tab:hover {
  color: rgba(244,246,255,.88);
  background: rgba(255,255,255,.03);
}

.notification-tab.active {
  border-color: rgba(117,103,238,.18);
  color: #fff;
  background: rgba(117,103,238,.11);
}

.notification-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden auto;
  padding: 16px 18px 22px;
}

.notification-list {
  display: grid;
  gap: 7px;
}

.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 12px;
  gap: 12px;
  align-items: start;
  min-height: 82px;
  padding: 14px 14px 14px 13px;
  border: 1px solid rgba(255,255,255,.052);
  border-radius: 14px;
  background: rgba(255,255,255,.018);
  cursor: pointer;
  transition: .14s ease;
}

.notification-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.09);
  background: rgba(255,255,255,.032);
}

.notification-item.unread {
  border-color: rgba(117,103,238,.14);
  background: linear-gradient(90deg, rgba(117,103,238,.08), rgba(255,255,255,.018));
}

.notification-type-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  color: #c9c3ff;
  background: rgba(117,103,238,.1);
  font-size: 14px;
  font-weight: 900;
}

.notification-type-icon.type-moderation,
.notification-type-icon.type-automod {
  color: #ffc8cc;
  border-color: rgba(255,100,112,.15);
  background: rgba(255,100,112,.07);
}

.notification-type-icon.type-friend_request {
  color: #bff7d7;
  border-color: rgba(70,219,140,.15);
  background: rgba(70,219,140,.07);
}

.notification-item-body {
  min-width: 0;
}

.notification-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 5px;
}

.notification-kind {
  color: rgba(166,177,215,.43);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .12em;
}

.notification-channel {
  max-width: 220px;
  overflow: hidden;
  color: rgba(176,187,224,.48);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item-meta time {
  margin-left: auto;
  color: rgba(177,188,226,.3);
  font-size: 9px;
}

.notification-item-body > strong {
  display: block;
  margin-bottom: 4px;
  color: #f2f4ff;
  font-size: 12px;
  font-weight: 730;
}

.notification-item-body p {
  margin: 0;
  overflow: hidden;
  color: rgba(218,224,246,.62);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item-body small {
  display: block;
  margin-top: 6px;
  color: rgba(174,185,224,.33);
  font-size: 9px;
}

.notification-unread-dot {
  align-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7f71f5;
  box-shadow: 0 0 13px rgba(127,113,245,.5);
}

.notification-empty {
  min-height: 370px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}

.notification-empty-icon {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 1px solid rgba(117,103,238,.18);
  border-radius: 20px;
  color: #aaa1ff;
  background: rgba(117,103,238,.075);
  font-size: 22px;
}

.notification-empty strong {
  color: #f4f6ff;
  font-size: 15px;
}

.notification-empty span {
  max-width: 420px;
  margin-top: 8px;
  color: rgba(193,203,234,.4);
  font-size: 11px;
  line-height: 1.55;
}

.notification-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 4px 4px 15px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.notification-settings-head h3 {
  margin: 5px 0 3px;
  color: #f5f7ff;
  font-size: 16px;
}

.notification-settings-head p {
  margin: 0;
  color: rgba(192,201,232,.39);
  font-size: 10px;
}

.notification-settings-list {
  display: grid;
  gap: 7px;
}

.notification-setting-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 190px auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
}

.notification-setting-channel {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-setting-symbol {
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  color: rgba(184,194,228,.58);
  background: rgba(255,255,255,.028);
  font-size: 13px;
  font-weight: 800;
}

.notification-setting-channel strong,
.notification-setting-channel span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-setting-channel strong {
  color: rgba(242,244,255,.88);
  font-size: 11px;
}

.notification-setting-channel span {
  margin-top: 3px;
  color: rgba(175,186,223,.35);
  font-size: 9px;
}

.notification-setting-mode span {
  display: block;
  margin-bottom: 5px;
  color: rgba(163,175,216,.37);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .11em;
}

.notification-setting-mode select {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 9px;
  outline: none;
  color: rgba(237,240,253,.76);
  background: #101521;
  font-size: 10px;
}

.notification-mute-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.notification-mini {
  min-width: 37px;
  height: 31px;
  padding: 0 8px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  color: rgba(219,224,245,.58);
  background: rgba(255,255,255,.025);
  font-size: 9px;
  cursor: pointer;
}

.notification-mini:hover {
  color: #fff;
  border-color: rgba(117,103,238,.2);
  background: rgba(117,103,238,.075);
}

.notification-mini.danger-soft {
  color: #ffabb2;
  border-color: rgba(255,100,112,.13);
  background: rgba(255,100,112,.045);
}

.notification-loading {
  padding: 50px;
  color: rgba(190,200,232,.42);
  text-align: center;
  font-size: 11px;
}

@media (max-width: 820px) {
  .notification-console {
    width: calc(100vw - 14px);
    height: calc(100dvh - 14px);
    border-radius: 18px;
  }

  .notification-console-header {
    min-height: 70px;
    padding: 0 15px;
  }

  .notification-read-all {
    display: none;
  }

  .notification-tabs {
    overflow-x: auto;
    padding: 8px 12px;
  }

  .notification-setting-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .notification-mute-actions {
    justify-content: flex-start;
  }
}

/* =========================================================
   BRILL CONNECT v1.1 · THREADS & GROUP CHATS
   ========================================================= */
.collab-header-button {
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:10px;
  color:#a9b1c3;
  background:rgba(255,255,255,.025);
  transition:.15s ease;
}
.collab-header-button:hover {
  color:#fff;
  border-color:rgba(117,103,238,.34);
  background:rgba(117,103,238,.12);
}
.collab-header-button svg {
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.channel-prefix.group-channel-avatar {
  width:25px;
  height:25px;
  border-radius:8px;
  overflow:hidden;
  flex:0 0 25px;
}
.channel-prefix.group-channel-avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
}
.channel-button[data-channel-type="group_dm"] .channel-prefix {
  color:#a998ff;
}
.channel-button[data-channel-type="group_dm"].active {
  border-color:rgba(117,103,238,.18);
  background:linear-gradient(90deg,rgba(117,103,238,.15),rgba(117,103,238,.04));
  box-shadow:inset 2px 0 0 var(--accent);
}

.collab-loading,
.collab-empty {
  padding:28px;
  border:1px solid var(--line);
  border-radius:14px;
  color:#949eb1;
  text-align:center;
  background:rgba(255,255,255,.018);
}
.collab-modal-intro {
  padding:18px 20px;
  margin-bottom:18px;
  border:1px solid rgba(117,103,238,.16);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(117,103,238,.10),rgba(255,255,255,.015));
}
.collab-modal-intro span,
.group-settings-hero > div:last-child > span {
  display:block;
  margin-bottom:6px;
  color:#8579f2;
  font-size:10px;
  font-weight:800;
  letter-spacing:.16em;
}
.collab-modal-intro strong {
  display:block;
  color:#f2f4f9;
  font-size:17px;
}
.collab-modal-intro p,
.group-settings-hero p {
  margin:7px 0 0;
  color:#8d96aa;
  font-size:12px;
  line-height:1.55;
}
.collab-group-form,
.collab-group-edit {
  display:grid;
  gap:16px;
}
.collab-form-grid,
.collab-group-edit {
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
}
.collab-field {
  display:grid;
  gap:7px;
  color:#9da6b8;
  font-size:11px;
  font-weight:700;
}
.collab-field > span {
  text-transform:uppercase;
  letter-spacing:.08em;
}
.collab-field input,
.collab-add-member select {
  width:100%;
  min-height:42px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:10px;
  color:#e9ecf4;
  background:#090d15;
  outline:none;
}
.collab-field input:focus,
.collab-add-member select:focus {
  border-color:rgba(117,103,238,.5);
  box-shadow:0 0 0 3px rgba(117,103,238,.08);
}
.collab-section-label {
  margin-top:2px;
  color:#717b90;
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em;
}
.collab-friend-picker,
.collab-participant-list {
  display:grid;
  gap:6px;
  max-height:340px;
  overflow:auto;
}
.collab-friend-check {
  position:relative;
  display:block;
  border:1px solid transparent;
  border-radius:12px;
  cursor:pointer;
  transition:.14s ease;
}
.collab-friend-check:hover {
  border-color:var(--line);
  background:rgba(255,255,255,.02);
}
.collab-friend-check:has(input:checked) {
  border-color:rgba(117,103,238,.35);
  background:rgba(117,103,238,.09);
}
.collab-friend-check > input {
  position:absolute;
  top:50%;
  right:14px;
  width:17px;
  height:17px;
  transform:translateY(-50%);
  accent-color:#7567ee;
}
.collab-user-row {
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.014);
}
.collab-friend-check .collab-user-row {
  padding-right:48px;
  border:0;
  background:transparent;
}
.collab-user-info {
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
}
.collab-user-info > div:last-child {
  min-width:0;
  display:grid;
  gap:2px;
}
.collab-user-info strong {
  overflow:hidden;
  color:#e9ecf4;
  font-size:13px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.collab-user-info span {
  color:#727d92;
  font-size:11px;
}
.collab-avatar {
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  flex:0 0 36px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:11px;
  color:#fff;
  font-size:11px;
  font-weight:800;
  background:linear-gradient(135deg,#6c60dc,#302a72);
}
.collab-avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
}
.collab-form-actions,
.collab-inline-actions,
.collab-add-member,
.collab-row-actions {
  display:flex;
  align-items:center;
  gap:8px;
}
.collab-form-actions {
  justify-content:flex-end;
}
.collab-group-form .collab-form-actions,
.collab-group-form .collab-section-label,
.collab-group-form .collab-friend-picker {
  grid-column:1/-1;
}
.collab-group-edit {
  margin-bottom:20px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.014);
}
.collab-group-edit .collab-inline-actions {
  grid-column:1/-1;
  justify-content:flex-end;
}
.group-settings-hero {
  display:flex;
  align-items:center;
  gap:15px;
  margin-bottom:18px;
  padding:16px;
  border:1px solid rgba(117,103,238,.18);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(117,103,238,.10),rgba(255,255,255,.015));
}
.group-settings-hero h3 {
  margin:0;
  color:#f1f3f8;
  font-size:18px;
}
.group-settings-avatar {
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  flex:0 0 58px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  border-radius:17px;
  color:#fff;
  font-size:16px;
  font-weight:900;
  background:linear-gradient(135deg,#7567ee,#302a72);
}
.group-settings-avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
}
.collab-owner-badge {
  padding:5px 8px;
  border:1px solid rgba(117,103,238,.24);
  border-radius:7px;
  color:#a79dff;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  background:rgba(117,103,238,.08);
}
.collab-add-member {
  margin-top:12px;
}
.collab-add-member select {
  flex:1;
}
.collab-leave-group {
  width:100%;
  min-height:42px;
  margin-top:18px;
  border:1px solid rgba(238,91,115,.25);
  border-radius:10px;
  color:#ff8096;
  background:rgba(238,91,115,.06);
}
.collab-leave-group:hover {
  background:rgba(238,91,115,.11);
}

.thread-panel-v11 {
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  z-index:1200;
  width:min(470px,calc(100vw - 72px));
  display:grid;
  grid-template-rows:72px auto minmax(0,1fr) auto auto;
  border-left:1px solid rgba(255,255,255,.075);
  background:linear-gradient(180deg,#0d111b,#080b12 72%);
  box-shadow:-24px 0 70px rgba(0,0,0,.38);
}
.thread-panel-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 16px 0 18px;
  border-bottom:1px solid var(--line);
  background:rgba(10,14,23,.96);
  backdrop-filter:blur(16px);
}
.thread-panel-header > div:first-child {
  min-width:0;
  display:grid;
  gap:3px;
}
.thread-panel-header span {
  color:#7567ee;
  font-size:9px;
  font-weight:900;
  letter-spacing:.16em;
}
.thread-panel-header strong {
  overflow:hidden;
  color:#f3f5f9;
  font-size:14px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.thread-panel-actions {
  display:flex;
  gap:7px;
}
.thread-parent-v11 {
  padding:14px 15px;
  border-bottom:1px solid var(--line);
  background:rgba(117,103,238,.035);
}
.thread-parent-card-v11,
.thread-message-v11 {
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.thread-parent-card-v11 > div:last-child,
.thread-message-content-v11 {
  min-width:0;
  flex:1;
}
.thread-parent-head-v11,
.thread-message-head-v11 {
  display:flex;
  align-items:baseline;
  gap:8px;
}
.thread-parent-head-v11 strong,
.thread-message-head-v11 strong {
  color:#edf0f6;
  font-size:12px;
}
.thread-parent-head-v11 time,
.thread-message-head-v11 time {
  color:#626c80;
  font-size:9px;
}
.thread-parent-card-v11 p {
  margin:5px 0 0;
  color:#aab2c1;
  font-size:12px;
  line-height:1.5;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.thread-avatar-v11 {
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  flex:0 0 32px;
  overflow:hidden;
  border-radius:10px;
  color:#fff;
  font-size:10px;
  font-weight:800;
  background:linear-gradient(135deg,#6156c6,#29245f);
}
.thread-avatar-v11 img {
  width:100%;
  height:100%;
  object-fit:cover;
}
.thread-messages-v11 {
  min-height:0;
  overflow:auto;
  padding:10px 11px 18px;
}
.thread-message-v11 {
  position:relative;
  padding:10px 8px;
  border-radius:10px;
}
.thread-message-v11:hover {
  background:rgba(255,255,255,.018);
}
.thread-message-body-v11 {
  margin-top:4px;
  color:#ccd2de;
  font-size:12px;
  line-height:1.55;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.thread-inline-reply-v11 {
  margin-bottom:5px;
  color:#7d879a;
  font-size:10px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.thread-message-actions-v11 {
  display:flex;
  gap:8px;
  margin-top:7px;
  opacity:0;
  transition:.14s ease;
}
.thread-message-v11:hover .thread-message-actions-v11 {
  opacity:1;
}
.thread-message-actions-v11 button {
  padding:0;
  border:0;
  color:#737d91;
  background:transparent;
  font-size:9px;
}
.thread-message-actions-v11 button:hover {
  color:#cdd2de;
}
.thread-message-actions-v11 .danger-text:hover {
  color:#ff758d;
}
.thread-reactions-v11 {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:6px;
}
.thread-reactions-v11 button {
  min-height:23px;
  padding:0 7px;
  border:1px solid var(--line);
  border-radius:7px;
  color:#aeb6c6;
  background:rgba(255,255,255,.025);
  font-size:10px;
}
.thread-reactions-v11 button.mine {
  border-color:rgba(117,103,238,.28);
  background:rgba(117,103,238,.10);
}
.thread-attachments-v11 {
  display:grid;
  gap:6px;
  margin-top:8px;
}
.thread-attachments-v11 a {
  color:#9e95ff;
  font-size:10px;
}
.thread-attachments-v11 img {
  width:min(100%,300px);
  max-height:220px;
  object-fit:cover;
  border-radius:10px;
}
.thread-empty-v11 {
  min-height:180px;
  display:grid;
  place-content:center;
  gap:5px;
  padding:30px;
  color:#757f93;
  text-align:center;
}
.thread-empty-v11 strong {
  color:#bfc5d1;
  font-size:13px;
}
.thread-empty-v11 span {
  max-width:280px;
  font-size:11px;
  line-height:1.5;
}
.thread-reply-preview,
.thread-pending-files {
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 12px;
  border-top:1px solid var(--line);
  background:#0b0f18;
}
.thread-reply-preview span {
  min-width:0;
  flex:1;
  overflow:hidden;
  color:#8e98aa;
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.thread-reply-preview button,
.thread-pending-files button {
  border:0;
  color:#8f98aa;
  background:transparent;
  font-size:10px;
}
.thread-pending-files {
  flex-wrap:wrap;
}
.thread-pending-files button {
  padding:5px 7px;
  border:1px solid var(--line);
  border-radius:7px;
  background:rgba(255,255,255,.02);
}
.thread-composer-v11 {
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  align-items:end;
  gap:7px;
  padding:10px 11px 12px;
  border-top:1px solid var(--line);
  background:#090d15;
}
.thread-composer-v11 textarea {
  min-height:40px;
  max-height:130px;
  resize:none;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:10px;
  color:#e4e8f0;
  background:#101520;
  outline:none;
  font:inherit;
  font-size:12px;
}
.thread-composer-v11 textarea:focus {
  border-color:rgba(117,103,238,.42);
}
.thread-attach-v11,
.thread-send-v11 {
  min-height:40px;
  border-radius:10px;
}
.thread-attach-v11 {
  width:34px;
  border:1px solid var(--line);
  color:#a4adbf;
  background:#101520;
}
.thread-send-v11 {
  padding:0 13px;
  border:1px solid rgba(117,103,238,.35);
  color:#fff;
  background:linear-gradient(135deg,#7567ee,#5d50ca);
  font-size:10px;
  font-weight:800;
}
.thread-send-v11:disabled,
.thread-composer-v11 textarea:disabled {
  opacity:.5;
  cursor:not-allowed;
}
.thread-action-v11 {
  color:#9c92ff !important;
}
.thread-action-v11:hover {
  color:#c7c1ff !important;
}

.notification-type-icon.type-group_dm,
.notification-type-icon.type-thread {
  border-color:rgba(117,103,238,.22);
  color:#a79dff;
  background:rgba(117,103,238,.08);
}

@media (max-width:1100px) {
  #createGroupV11,
  #groupSettingsV11 {
    display:none;
  }
}

@media (max-width:760px) {
  .thread-panel-v11 {
    width:100vw;
    border-left:0;
  }
  .collab-form-grid,
  .collab-group-edit {
    grid-template-columns:1fr;
  }
  .collab-group-edit .collab-inline-actions {
    grid-column:1;
  }
  .thread-message-actions-v11 {
    opacity:1;
  }
}
.channel-symbol .group-header-avatar {
  width:32px;
  height:32px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.09);
  border-radius:10px;
}


/* =========================================================
   BRILL CONNECT v1.2 - CALLS & SCREEN SHARE
   ========================================================= */

.call-header-button-v12 {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  color: var(--text-primary, #f5f7ff);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: .16s ease;
}

.call-header-button-v12:hover {
  background: rgba(124,109,242,.16);
  border-color: rgba(124,109,242,.42);
  transform: translateY(-1px);
}

.call-header-button-v12 svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.call-incoming-v12 {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2600;
  width: min(390px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(124,109,242,.32);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(22,24,39,.98), rgba(11,13,23,.98));
  box-shadow: 0 24px 70px rgba(0,0,0,.48), 0 0 0 1px rgba(255,255,255,.025) inset;
}

.call-incoming-head-v12 {
  display: flex;
  gap: 14px;
  align-items: center;
}

.call-avatar-v12 {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #6958ed, #4939b7);
  color: white;
  font-weight: 800;
}

.call-avatar-v12 img { width:100%; height:100%; object-fit:cover; }
.call-incoming-copy-v12 { min-width:0; }
.call-incoming-kicker-v12 { font-size:10px; letter-spacing:.14em; color:#8f93a7; font-weight:800; }
.call-incoming-copy-v12 strong { display:block; margin-top:4px; font-size:17px; color:#f7f8ff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.call-incoming-copy-v12 span { display:block; margin-top:3px; font-size:12px; color:#9ba0b5; }
.call-incoming-actions-v12 { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.call-incoming-actions-v12 button { min-height:42px; border:0; border-radius:12px; font-weight:800; cursor:pointer; }
.call-accept-v12 { color:white; background:#31a66a; }
.call-decline-v12 { color:white; background:#d84f62; }

.call-stage-v12 {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  max-height: 58vh;
  margin: 14px 16px 0;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% -10%, rgba(124,109,242,.16), transparent 38%),
    linear-gradient(180deg, #10121d, #0b0d15);
  box-shadow: 0 18px 45px rgba(0,0,0,.23);
}

.call-stage-top-v12 {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.call-stage-title-v12 { min-width:0; }
.call-stage-title-v12 small { display:block; font-size:10px; letter-spacing:.13em; color:#7f8499; font-weight:800; }
.call-stage-title-v12 strong { display:block; margin-top:3px; color:#f7f8ff; font-size:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.call-stage-live-v12 { display:flex; align-items:center; gap:7px; color:#9da2b6; font-size:11px; font-weight:700; }
.call-stage-live-v12 i { width:7px; height:7px; border-radius:50%; background:#36c978; box-shadow:0 0 12px rgba(54,201,120,.65); }

.call-grid-v12 {
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  grid-auto-rows:minmax(190px,1fr);
  gap:10px;
  padding:12px;
  overflow:auto;
}
.call-tile-v12 {
  position:relative;
  min-height:190px;
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(145deg,#181b2a,#10121c);
  border:1px solid rgba(255,255,255,.055);
  display:grid;
  place-items:center;
}
.call-tile-v12.speaking { border-color:rgba(56,204,122,.85); box-shadow:0 0 0 2px rgba(56,204,122,.18) inset; }
.call-tile-video-v12 { position:absolute; inset:0; }
.call-tile-video-v12 video { width:100%; height:100%; object-fit:cover; display:block; }
.call-tile-video-v12 video[data-screen-share="true"] { object-fit:contain; background:#06070b; }
.call-tile-avatar-v12 { width:76px; height:76px; border-radius:24px; overflow:hidden; display:grid; place-items:center; background:linear-gradient(145deg,#6757ec,#3d328f); color:white; font-size:23px; font-weight:900; }
.call-tile-avatar-v12 img { width:100%; height:100%; object-fit:cover; }
.call-tile-meta-v12 { position:absolute; left:10px; bottom:10px; display:flex; align-items:center; gap:7px; padding:6px 9px; border-radius:9px; background:rgba(5,6,10,.72); backdrop-filter:blur(10px); color:white; font-size:12px; font-weight:750; }
.call-tile-meta-v12 i { width:7px; height:7px; border-radius:50%; background:#717687; }
.call-tile-v12.speaking .call-tile-meta-v12 i { background:#3bd17d; }

.call-controls-v12 {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:13px 16px 16px;
  border-top:1px solid rgba(255,255,255,.055);
  background:rgba(7,9,15,.62);
}
.call-control-v12 {
  min-width:44px;
  height:44px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:13px;
  background:rgba(255,255,255,.055);
  color:#f5f7ff;
  display:grid;
  place-items:center;
  cursor:pointer;
  font-size:11px;
  font-weight:800;
  padding:0 12px;
}
.call-control-v12.active { background:rgba(124,109,242,.2); border-color:rgba(124,109,242,.5); }
.call-control-v12.off { background:rgba(216,79,98,.14); color:#ff8998; }
.call-control-v12.danger { background:#cf465a; border-color:#cf465a; min-width:72px; }
.call-control-v12:hover { filter:brightness(1.12); }

.call-dock-v12 {
  position:fixed;
  left:calc(72px + 280px + 18px);
  bottom:18px;
  z-index:1800;
  min-width:300px;
  max-width:420px;
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px 12px;
  border:1px solid rgba(124,109,242,.28);
  border-radius:15px;
  background:rgba(15,17,27,.96);
  box-shadow:0 16px 45px rgba(0,0,0,.38);
}
.call-dock-v12 .call-dock-copy { flex:1; min-width:0; }
.call-dock-v12 small { display:block; color:#43cd7f; font-size:9px; letter-spacing:.12em; font-weight:900; }
.call-dock-v12 strong { display:block; margin-top:2px; color:#f5f6fd; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12px; }
.call-dock-v12 button { border:0; border-radius:9px; min-width:34px; height:34px; cursor:pointer; font-weight:900; }
.call-dock-open-v12 { background:rgba(124,109,242,.18); color:#c8c2ff; }
.call-dock-leave-v12 { background:rgba(214,68,88,.2); color:#ff8291; }

@media (max-width: 900px) {
  .call-stage-v12 { margin:8px; min-height:300px; max-height:56vh; }
  .call-grid-v12 { grid-template-columns:1fr; grid-auto-rows:minmax(180px,1fr); }
  .call-dock-v12 { left:12px; right:12px; bottom:12px; max-width:none; min-width:0; }
  .call-header-button-v12 { width:36px; height:36px; }
}


/* =========================================================
   BRILL CONNECT v1.3 - PROFILES, STATUS & ACTIVITY
   ========================================================= */
.profile-layer{position:fixed;inset:0;z-index:9900;display:flex;align-items:center;justify-content:center;padding:28px}.profile-layer-backdrop{position:absolute;inset:0;background:rgba(2,4,12,.76);backdrop-filter:blur(16px)}.profile-card,.profile-editor{position:relative;z-index:1;background:linear-gradient(180deg,#11162a 0%,#0b0f1f 100%);border:1px solid rgba(255,255,255,.1);box-shadow:0 30px 100px rgba(0,0,0,.6);overflow:hidden}.profile-card{width:min(460px,calc(100vw - 32px));border-radius:24px}.profile-card:before,.profile-editor:before{content:"";position:absolute;inset:0 auto auto 0;width:100%;height:2px;background:linear-gradient(90deg,transparent,var(--profile-accent,#7C6DF2),transparent);z-index:5}.profile-card-close{position:absolute;right:14px;top:14px;z-index:8;width:34px;height:34px;border:0;border-radius:11px;background:rgba(5,7,16,.62);color:#cfd4e7;font-size:22px;cursor:pointer}.profile-card-close:hover{background:rgba(255,255,255,.12);color:#fff}.profile-banner{height:146px;background:radial-gradient(circle at 20% 20%,color-mix(in srgb,var(--profile-accent,#7C6DF2) 65%,transparent),transparent 42%),linear-gradient(135deg,#202a52,#11162a 55%,#17122e);background-size:cover;background-position:center}.profile-identity-row{display:flex;align-items:flex-end;justify-content:space-between;padding:0 22px;margin-top:-48px}.profile-avatar-shell{position:relative}.profile-avatar{display:flex;align-items:center;justify-content:center;overflow:hidden;background:linear-gradient(145deg,var(--profile-accent,#7C6DF2),#322769);color:#fff;font-weight:850;letter-spacing:.02em}.profile-avatar img{width:100%;height:100%;object-fit:cover}.profile-avatar.large{width:104px;height:104px;border-radius:34px;border:7px solid #0e1324;font-size:30px}.profile-presence{position:absolute;right:5px;bottom:6px;width:21px;height:21px;border:5px solid #0e1324;border-radius:50%;background:#60687c}.profile-presence.online{background:#3ddc97}.profile-presence.idle{background:#f5b94c}.profile-presence.dnd{background:#ef5c6b}.profile-card-action{padding-bottom:5px}.profile-primary,.profile-secondary{min-height:38px;padding:0 16px;border-radius:11px;font-weight:750;border:1px solid transparent;cursor:pointer}.profile-primary{background:linear-gradient(135deg,var(--profile-accent,#7C6DF2),#6252df);color:#fff;box-shadow:0 10px 28px color-mix(in srgb,var(--profile-accent,#7C6DF2) 24%,transparent)}.profile-primary:hover{filter:brightness(1.08)}.profile-secondary{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.09);color:#ccd2e3}.profile-secondary:disabled{opacity:.55;cursor:default}.profile-card-body{padding:18px 22px 24px}.profile-card-body h2{margin:0;color:#f5f7ff;font-size:24px;line-height:1.15}.profile-username{margin-top:4px;color:#7f889f;font-size:13px}.profile-custom-status{display:flex;gap:8px;align-items:center;margin-top:15px;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.07);color:#dce1f0;font-size:13px}.profile-role-pills{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}.profile-role-pill{--role:#7C6DF2;padding:5px 8px;border:1px solid color-mix(in srgb,var(--role) 48%,transparent);background:color-mix(in srgb,var(--role) 11%,transparent);color:var(--role);border-radius:8px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.055em}.profile-role-pill.system{--role:var(--profile-accent,#7C6DF2)}.profile-section-kicker{font-size:9px;font-weight:850;letter-spacing:.16em;color:#768099}.profile-about{margin-top:18px}.profile-about p{margin:7px 0 0;color:#c9cfde;font-size:13px;line-height:1.55;word-break:break-word}.profile-activity-card{display:flex;gap:13px;align-items:center;margin-top:18px;padding:13px;border:1px solid rgba(124,109,242,.2);background:linear-gradient(135deg,rgba(124,109,242,.11),rgba(255,255,255,.025));border-radius:15px}.profile-activity-card.rust{border-color:rgba(216,104,58,.22);background:linear-gradient(135deg,rgba(216,104,58,.11),rgba(255,255,255,.025))}.profile-activity-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:linear-gradient(145deg,var(--profile-accent,#7C6DF2),#433694);color:#fff;font-size:13px;font-weight:900;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}.profile-activity-card.rust .profile-activity-icon{background:linear-gradient(145deg,#d8683a,#6f2c1d)}.profile-activity-copy{display:flex;min-width:0;flex-direction:column}.profile-activity-copy strong{margin-top:3px;color:#f1f3fb;font-size:13px}.profile-activity-copy span{color:#9ca5ba;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-activity-copy small{margin-top:3px;color:#68728a;font-size:10px}.profile-meta-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid rgba(255,255,255,.07)}.profile-meta-row div{display:flex;flex-direction:column;gap:4px}.profile-meta-row span{font-size:9px;font-weight:800;letter-spacing:.12em;color:#69738a}.profile-meta-row strong{font-size:11px;font-weight:650;color:#bdc4d6}.member.profile-clickable{cursor:pointer}.member.profile-clickable:hover{background:rgba(255,255,255,.055)}.member-activity{margin-top:2px;color:#8f83ff;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-avatar,.message-author{cursor:pointer}.message-author:hover{text-decoration:underline}.profile-editor{width:min(880px,calc(100vw - 36px));max-height:calc(100vh - 40px);border-radius:24px;overflow:auto}.profile-editor-header{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:center;padding:20px 24px;background:rgba(13,18,34,.94);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.07)}.profile-editor-header span{font-size:9px;letter-spacing:.17em;color:#797fff;font-weight:850}.profile-editor-header h2{margin:4px 0 0;font-size:20px;color:#f6f7fc}.profile-editor .profile-card-close{position:static}.profile-editor-form{padding:22px 24px 24px}.profile-editor-preview{position:relative;min-height:190px;border-radius:18px;background:#0b1020;border:1px solid rgba(255,255,255,.07);overflow:hidden}.profile-editor-preview .profile-banner{height:118px}.profile-editor-avatar{position:absolute;left:20px;top:70px}.profile-editor-preview-copy{position:absolute;left:140px;bottom:25px;display:flex;flex-direction:column}.profile-editor-preview-copy strong{color:#f5f7ff;font-size:18px}.profile-editor-preview-copy span{color:#757f97;font-size:11px}.profile-editor-grid{display:grid;grid-template-columns:1fr 160px 1fr;gap:14px;margin-top:20px}.profile-field{display:flex;min-width:0;flex-direction:column;gap:7px}.profile-field.full{grid-column:1/-1}.profile-field>span{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#848da4}.profile-field input,.profile-field select,.profile-field textarea{width:100%;border:1px solid rgba(255,255,255,.08);border-radius:11px;background:#090d1a;color:#e8ebf5;padding:11px 12px;outline:none}.profile-field input:focus,.profile-field select:focus,.profile-field textarea:focus{border-color:color-mix(in srgb,var(--profile-accent,#7C6DF2) 65%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--profile-accent,#7C6DF2) 13%,transparent)}.profile-field input[type=color]{height:42px;padding:5px}.profile-field input[type=file]{font-size:11px}.profile-field textarea{resize:vertical;min-height:110px}.profile-field small{align-self:flex-end;color:#69738b;font-size:10px}.profile-field small b{color:#9aa3b7}.profile-activity-editor{padding:15px;border-radius:16px;background:rgba(255,255,255,.027);border:1px solid rgba(255,255,255,.07)}.activity-grid{grid-template-columns:180px 1fr 1fr;margin-top:10px}.profile-editor-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;padding-top:18px;border-top:1px solid rgba(255,255,255,.07)}
@media(max-width:760px){.profile-layer{padding:10px}.profile-card{width:100%;max-height:calc(100vh - 20px);overflow:auto}.profile-banner{height:122px}.profile-avatar.large{width:88px;height:88px;border-radius:28px}.profile-identity-row{margin-top:-40px;padding:0 16px}.profile-card-body{padding:16px}.profile-editor{width:100%;max-height:calc(100vh - 20px)}.profile-editor-form,.profile-editor-header{padding-left:15px;padding-right:15px}.profile-editor-grid,.activity-grid{grid-template-columns:1fr}.profile-field.full{grid-column:1}.profile-editor-preview-copy{left:124px}.profile-meta-row{grid-template-columns:1fr}}


/* =================================================
   BRILL CONNECT v1.4 - BRILL ACCOUNT & GAME PRESENCE
   ================================================= */
.profile-game-accounts{margin-top:18px}.profile-game-account-list{display:flex;flex-direction:column;gap:8px;margin-top:8px}.profile-game-account{display:grid;grid-template-columns:38px 1fr 10px;gap:10px;align-items:center;padding:10px 11px;border:1px solid rgba(124,109,242,.16);background:rgba(124,109,242,.055);border-radius:12px}.profile-game-account.rust{border-color:rgba(216,104,58,.18);background:rgba(216,104,58,.055)}.profile-game-account-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:linear-gradient(145deg,#7667ee,#372d82);color:#fff;font-size:10px;font-weight:900}.profile-game-account.rust .profile-game-account-icon{background:linear-gradient(145deg,#d8683a,#6d2a1b)}.profile-game-account>div{display:flex;min-width:0;flex-direction:column}.profile-game-account strong{font-size:11px;color:#e9ecf7}.profile-game-account small{margin-top:2px;color:#737d94;font-size:9px}.profile-game-account>i{width:8px;height:8px;border-radius:50%;background:#555e74}.profile-game-account>i.online{background:#3ddc97;box-shadow:0 0 10px rgba(61,220,151,.55)}
.profile-game-integration-note{margin:7px 0 13px;color:#8c96ad;font-size:11px;line-height:1.5}.game-integration-panel{width:100%}.game-integration-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.game-link-card{position:relative;padding:14px;border:1px solid rgba(124,109,242,.17);background:linear-gradient(150deg,rgba(124,109,242,.07),rgba(6,9,18,.65));border-radius:15px;overflow:hidden}.game-link-card.rust{border-color:rgba(216,104,58,.18);background:linear-gradient(150deg,rgba(216,104,58,.065),rgba(6,9,18,.65))}.game-link-card.linked{border-color:rgba(61,220,151,.18)}.game-link-card-head{display:grid;grid-template-columns:44px 1fr auto;gap:10px;align-items:center}.game-link-logo{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,#7768ef,#342a7f);color:#fff;font-size:11px;font-weight:900;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}.game-link-card.rust .game-link-logo{background:linear-gradient(145deg,#d8683a,#6d2a1b)}.game-link-card-head>div{display:flex;min-width:0;flex-direction:column}.game-link-card-head strong{color:#eff2fb;font-size:12px}.game-link-card-head small{margin-top:3px;color:#727d96;font-size:8px;font-weight:800;letter-spacing:.09em}.game-link-live,.game-link-offline{font-size:8px;font-weight:900;letter-spacing:.08em}.game-link-live{display:flex;gap:5px;align-items:center;color:#65e4aa}.game-link-live i{width:7px;height:7px;border-radius:50%;background:#3ddc97;box-shadow:0 0 10px rgba(61,220,151,.55)}.game-link-offline{color:#657088}.game-link-card>p{margin:12px 0 0;color:#919ab0;font-size:10px;line-height:1.55}.game-link-card>p b{color:#cbd1e2;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.game-link-pending{margin-top:10px;padding:8px 9px;border-radius:9px;background:rgba(245,185,76,.07);border:1px solid rgba(245,185,76,.14);color:#b6a06e;font-size:9px}.game-link-card-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px;padding-top:11px;border-top:1px solid rgba(255,255,255,.055)}.game-link-card-actions>span{color:#69748d;font-size:9px}.game-link-verified{color:#55c991!important;font-weight:750}.game-link-card-actions .profile-primary,.game-link-card-actions .profile-secondary{min-height:32px;padding:0 11px;font-size:10px}.game-link-presence-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;margin-top:12px}.game-link-presence-grid>div{display:flex;min-width:0;flex-direction:column;padding:8px;border-radius:9px;background:rgba(255,255,255,.025)}.game-link-presence-grid span{color:#626c84;font-size:7px;font-weight:850;letter-spacing:.08em}.game-link-presence-grid strong{margin-top:3px;color:#bfc6d7;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-integration-security{margin-top:10px;color:#657087;font-size:9px}.game-integration-security span{margin-right:7px;color:#7164da;font-weight:900;letter-spacing:.08em}.game-integration-loading,.game-integration-error{padding:18px;border-radius:13px;background:rgba(255,255,255,.025);color:#8791a8;font-size:11px}.game-integration-error{color:#e28b95}
.game-code-layer{position:fixed;inset:0;z-index:10050;display:grid;place-items:center;padding:18px}.game-code-backdrop{position:absolute;inset:0;background:rgba(2,4,12,.82);backdrop-filter:blur(18px)}.game-code-modal{position:relative;z-index:1;width:min(460px,100%);padding:24px;border:1px solid rgba(124,109,242,.22);border-radius:22px;background:linear-gradient(180deg,#11172c,#090d1c);box-shadow:0 35px 100px rgba(0,0,0,.65)}.game-code-kicker{color:#8378f2;font-size:9px;font-weight:900;letter-spacing:.15em}.game-code-modal h3{margin:6px 0 0;color:#f4f6fc;font-size:21px}.game-code-modal p{margin:12px 0 8px;color:#929cb2;font-size:11px}.game-code-command{display:flex;gap:8px;align-items:center;padding:10px;border-radius:12px;background:#060a15;border:1px solid rgba(255,255,255,.07)}.game-code-command code{flex:1;color:#d8dcf0;font-size:13px}.game-code-command button{border:0;border-radius:8px;background:#282245;color:#aaa2fb;padding:7px 9px;font-size:9px;cursor:pointer}.game-code-value{margin:16px 0 8px;text-align:center;color:#fff;font-size:34px;font-weight:900;letter-spacing:.18em}.game-code-modal>small{display:block;text-align:center;color:#6e7890;font-size:9px}.game-code-close-button{width:100%;margin-top:18px}
.notification-type-icon.type-game{background:rgba(124,109,242,.13);color:#988cff;border-color:rgba(124,109,242,.2)}
@media(max-width:760px){.game-integration-grid{grid-template-columns:1fr}.game-link-presence-grid{grid-template-columns:1fr 1fr}.game-link-card-head{grid-template-columns:42px 1fr}.game-link-card-head>.game-link-live,.game-link-card-head>.game-link-offline{grid-column:2}.game-code-value{font-size:28px}}

/* =========================================================
   BRILL CONNECT v1.5 · BRILL ID / ACCOUNT CENTER
   ========================================================= */
.account-center-button{margin-left:auto;color:#a9b5d1}.account-center-button:hover{color:#fff;background:rgba(124,109,242,.16)}
.account-center-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.account-center-layer{position:fixed;inset:0;z-index:14000;display:flex;align-items:center;justify-content:center;font-family:inherit;color:#eef2ff}
.account-center-backdrop{position:absolute;inset:0;background:rgba(2,4,10,.78);backdrop-filter:blur(14px)}
.account-center{position:relative;width:min(1120px,calc(100vw - 56px));height:min(760px,calc(100vh - 56px));display:grid;grid-template-columns:245px minmax(0,1fr);overflow:hidden;border:1px solid rgba(150,162,207,.14);border-radius:24px;background:#090d17;box-shadow:0 38px 110px rgba(0,0,0,.58)}
.account-nav{display:flex;flex-direction:column;gap:7px;padding:22px 14px 18px;border-right:1px solid rgba(150,162,207,.1);background:linear-gradient(180deg,#0d1220,#080b13)}
.account-nav-brand{display:flex;align-items:center;gap:12px;margin:0 6px 22px;padding-bottom:20px;border-bottom:1px solid rgba(150,162,207,.1)}
.account-nav-brand>b{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:linear-gradient(145deg,#8a74ff,#5745d4);box-shadow:0 10px 30px rgba(104,82,240,.28);font-size:20px}.account-nav-brand div{display:flex;flex-direction:column}.account-nav-brand strong{font-size:14px;letter-spacing:.08em}.account-nav-brand span{margin-top:3px;color:#68738c;font-size:9px;font-weight:800;letter-spacing:.15em}
.account-nav>button{display:flex;align-items:center;gap:11px;width:100%;padding:11px 12px;border:0;border-radius:10px;background:transparent;color:#8995ad;text-align:left;font:600 13px inherit;cursor:pointer}.account-nav>button span{display:grid;place-items:center;width:20px;color:#69758d}.account-nav>button:hover{background:#121827;color:#dfe6fb}.account-nav>button.active{background:linear-gradient(90deg,rgba(124,109,242,.17),rgba(124,109,242,.05));color:#fff;box-shadow:inset 2px 0 #806df4}.account-nav>button.active span{color:#9c8cff}.account-nav-spacer{flex:1}.account-nav-foot{padding:14px 12px 2px;color:#515d74;font-size:10px;font-weight:800;letter-spacing:.08em;line-height:1.6}.account-nav-foot small{font-weight:600;letter-spacing:.04em}
.account-main{min-width:0;display:flex;flex-direction:column;background:radial-gradient(circle at 90% -10%,rgba(104,80,237,.12),transparent 34%),#0a0f1a}.account-main-header{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid rgba(150,162,207,.1)}.account-main-header div{display:flex;flex-direction:column}.account-main-header span{color:#59667e;font-size:9px;font-weight:800;letter-spacing:.16em}.account-main-header strong{margin-top:3px;font-size:16px}.account-main-header>button{width:36px;height:36px;border:0;border-radius:10px;background:#111725;color:#8692aa;font-size:24px;cursor:pointer}.account-main-header>button:hover{background:#192133;color:#fff}
.account-body{flex:1;overflow:auto;padding:30px}.account-loading,.account-load-error{display:grid;place-items:center;height:100%;color:#71809a;font-size:14px}.account-load-error small{margin-top:8px;color:#db7084}
.account-hero{position:relative;display:flex;align-items:center;gap:20px;min-height:154px;padding:27px;border:1px solid rgba(140,126,255,.2);border-radius:19px;background:linear-gradient(115deg,rgba(99,78,220,.18),rgba(14,21,37,.85) 54%,rgba(13,18,31,.96));overflow:hidden}.account-hero:after{content:"";position:absolute;right:-80px;top:-130px;width:330px;height:330px;border-radius:50%;background:radial-gradient(circle,rgba(131,105,255,.18),transparent 66%);pointer-events:none}.account-brill-mark{display:grid;place-items:center;flex:0 0 72px;height:72px;border-radius:21px;background:linear-gradient(145deg,#8d78ff,#503bc7);box-shadow:0 16px 45px rgba(92,65,219,.34);font-size:34px;font-weight:900}.account-hero-copy{position:relative;z-index:1;min-width:0}.account-hero-copy>span,.account-page-head span,.account-section header span{color:#6e7a95;font-size:9px;font-weight:900;letter-spacing:.15em}.account-hero-copy h2{margin:5px 0 6px;font-size:25px}.account-hero-copy p{margin:7px 0 0;color:#78849c;font-size:12px}.account-id-line{display:flex;align-items:center;gap:9px}.account-id-line code{color:#b9b0ff;font-size:13px;font-weight:800;letter-spacing:.06em}.account-id-line button,.account-section header button{border:1px solid rgba(137,122,255,.24);border-radius:7px;background:rgba(111,91,232,.09);color:#9f92fb;padding:5px 8px;font:700 10px inherit;cursor:pointer}.account-verified{position:absolute;right:24px;top:24px;display:flex;align-items:center;gap:7px;color:#6fe1ab;font-size:9px;font-weight:900;letter-spacing:.1em}.account-verified i{width:7px;height:7px;border-radius:50%;background:#55d999;box-shadow:0 0 14px #55d999}
.account-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-top:14px}.account-stat-grid article{display:flex;flex-direction:column;padding:18px;border:1px solid rgba(150,162,207,.1);border-radius:14px;background:#0d1320}.account-stat-grid span{color:#59667d;font-size:9px;font-weight:900;letter-spacing:.12em}.account-stat-grid strong{margin:8px 0 2px;font-size:22px}.account-stat-grid small{color:#67738b;font-size:10px}
.account-section{margin-top:17px;padding:21px;border:1px solid rgba(150,162,207,.1);border-radius:16px;background:#0c121e}.account-section.muted{opacity:.78}.account-section>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.account-section header h3{margin:3px 0 0;font-size:15px}.account-section header b{color:#6fe1ab;font-size:10px;letter-spacing:.1em}.account-sso-note p{margin:0;max-width:760px;color:#8190a8;font-size:12px;line-height:1.75}.account-game-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.account-game{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid rgba(150,162,207,.08);border-radius:12px;background:#0f1624}.account-game-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#6653dd;color:#fff;font-weight:900}.account-game.rust .account-game-mark{background:#a75235}.account-game>div:nth-child(2){display:flex;flex:1;flex-direction:column}.account-game strong{font-size:12px}.account-game span{margin-top:3px;color:#69758c;font-size:9px;text-transform:uppercase}.account-game i{width:8px;height:8px;border-radius:50%;background:#3d4657}.account-game i.online{background:#55d999;box-shadow:0 0 12px rgba(85,217,153,.55)}.account-empty{padding:19px;border:1px dashed rgba(150,162,207,.12);border-radius:11px;color:#65718a;text-align:center;font-size:11px}
.account-page-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:21px}.account-page-head h2{margin:4px 0 4px;font-size:24px}.account-page-head p{margin:0;color:#758199;font-size:12px}.account-danger,.account-primary{border:0;border-radius:9px;padding:10px 13px;font:800 11px inherit;cursor:pointer}.account-danger{background:rgba(229,76,102,.1);color:#ef7388;border:1px solid rgba(229,76,102,.2)}.account-primary{background:#705ce8;color:white;box-shadow:0 8px 24px rgba(91,69,218,.23)}
.account-session-list{display:flex;flex-direction:column;gap:8px}.account-session{display:flex;align-items:center;gap:13px;padding:13px;border:1px solid rgba(150,162,207,.08);border-radius:12px;background:#0f1624}.account-session.current{border-color:rgba(103,222,165,.22);background:linear-gradient(90deg,rgba(65,179,126,.07),#0f1624)}.account-session.ended{opacity:.62}.account-device-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#151d2d;color:#9b8cf8}.account-session-copy{min-width:0;display:flex;flex:1;flex-direction:column}.account-session-copy>div{display:flex;align-items:center;gap:8px}.account-session-copy strong{font-size:12px}.account-session-copy>span,.account-session-copy>small{margin-top:3px;color:#68758c;font-size:10px}.account-current{padding:2px 5px;border-radius:4px;background:rgba(65,189,132,.11);color:#63dba1!important;font-size:8px!important;font-weight:900;letter-spacing:.07em}.account-danger-mini{padding:7px 9px;border:1px solid rgba(228,77,104,.17);border-radius:7px;background:rgba(228,77,104,.08);color:#e77689;font:800 9px inherit;cursor:pointer}.account-ended{color:#58647b;font-size:8px;font-weight:900;letter-spacing:.09em}
.account-password-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.account-password-form label{display:flex;flex-direction:column;gap:6px}.account-password-form label:first-child{grid-column:1/-1}.account-password-form label span{color:#7e8aa1;font-size:10px;font-weight:700}.account-password-form input{height:40px;padding:0 11px;border:1px solid rgba(150,162,207,.13);border-radius:9px;background:#090e18;color:#fff;outline:none}.account-password-form input:focus{border-color:#7360e8}.account-password-note{grid-column:1/-1;color:#65728a;font-size:10px}.account-password-form .account-primary{justify-self:start}.account-inline-error{grid-column:1/-1;padding:8px 10px;border-radius:7px;background:rgba(222,69,94,.08);color:#e87588;font-size:10px}.account-events{display:flex;flex-direction:column}.account-events article{display:flex;align-items:center;gap:10px;padding:11px 3px;border-bottom:1px solid rgba(150,162,207,.07)}.account-events article:last-child{border-bottom:0}.account-events i{width:7px;height:7px;border-radius:50%;background:#7662eb}.account-events article>div{display:flex;flex:1;flex-direction:column}.account-events strong{font-size:11px}.account-events span{margin-top:3px;color:#68758d;font-size:9px}.account-events time{color:#59667d;font-size:9px}
@media(max-width:760px){.account-center{width:100vw;height:100vh;border:0;border-radius:0;grid-template-columns:70px minmax(0,1fr)}.account-nav{padding:15px 8px}.account-nav-brand{justify-content:center;margin:0 0 14px}.account-nav-brand div,.account-nav>button:not(.active){font-size:0}.account-nav>button{justify-content:center;padding:12px 4px}.account-nav>button span{font-size:14px}.account-nav>button.active{font-size:0}.account-nav-foot{display:none}.account-body{padding:18px}.account-hero{align-items:flex-start;padding:20px}.account-brill-mark{width:52px;flex-basis:52px;height:52px}.account-verified{display:none}.account-stat-grid,.account-game-grid,.account-password-form{grid-template-columns:1fr}.account-password-form label:first-child{grid-column:auto}.account-page-head{gap:12px;flex-direction:column}.account-session{align-items:flex-start;flex-wrap:wrap}.account-danger-mini{margin-left:51px}.account-main-header{padding:0 18px}}
.profile-brill-id{display:inline-flex;margin-top:7px;padding:4px 7px;border:1px solid rgba(139,124,255,.17);border-radius:6px;background:rgba(111,91,232,.07);color:#8f82e8;font-size:9px;font-weight:800;letter-spacing:.08em}


/* =========================================================
   BRILL CONNECT v1.6 · TWO-FACTOR AUTHENTICATION & RECOVERY
   ========================================================= */
.auth-2fa-shield{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;margin:0 auto 15px;background:linear-gradient(145deg,#765df5,#5141c8);box-shadow:0 14px 36px rgba(104,83,238,.28);font-weight:900;letter-spacing:.06em}.auth-trust-device{display:flex!important;align-items:center;gap:10px!important;margin:4px 0 16px;color:#aeb6ca!important}.auth-trust-device input,.twofactor-check input{width:16px!important;height:16px!important;accent-color:#7866f2}.auth-back{width:100%;margin-top:10px;padding:10px;border:0;background:transparent;color:#8f98ad;cursor:pointer}.auth-back:hover{color:#fff}.twofactor-required-banner{width:100%;display:grid;grid-template-columns:1fr auto;grid-template-areas:"a c" "b c";align-items:center;text-align:left;padding:17px 19px;border:1px solid rgba(255,96,110,.25);border-radius:14px;background:linear-gradient(90deg,rgba(173,50,65,.14),rgba(91,70,226,.08));color:#fff;cursor:pointer}.twofactor-required-banner b{grid-area:a;font-size:12px;color:#ff8793;letter-spacing:.09em}.twofactor-required-banner span{grid-area:b;margin-top:5px;color:#aeb6c9;font-size:13px}.twofactor-required-banner strong{grid-area:c;color:#c6bbff;font-size:13px}.account-stat-grid article.secure{border-color:rgba(72,211,150,.2)}.account-stat-grid article.secure strong{color:#61dda2}.account-stat-grid article.danger{border-color:rgba(255,96,110,.2)}.account-stat-grid article.danger strong{color:#ff8290}.security-required-pill,.security-active-pill{align-self:center;padding:7px 10px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.1em}.security-required-pill{background:rgba(255,91,108,.12);color:#ff8793;border:1px solid rgba(255,91,108,.24)}.security-active-pill{background:rgba(64,208,143,.1);color:#67dfa4;border:1px solid rgba(64,208,143,.22)}.twofactor-intro{display:grid;grid-template-columns:100px 1fr;gap:24px;align-items:center}.twofactor-lock{height:100px;border-radius:26px;display:grid;place-items:center;background:radial-gradient(circle at 35% 25%,#8b78ff,#4335a8 70%);font-size:24px;font-weight:950;letter-spacing:.04em;box-shadow:0 20px 50px rgba(92,72,226,.22)}.twofactor-intro h3,.twofactor-step h3{margin:4px 0 8px}.twofactor-intro p,.twofactor-step p{color:#a5adbf;line-height:1.55}.twofactor-intro ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 24px;padding-left:18px;color:#c6ccda;font-size:12px}.twofactor-setup-card{display:grid;gap:20px}.twofactor-step{display:grid;grid-template-columns:44px 1fr;gap:15px;padding:16px;border:1px solid rgba(255,255,255,.055);border-radius:14px;background:rgba(255,255,255,.018)}.twofactor-step>b{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#6c5ce7;color:white}.twofactor-secret{display:flex;gap:8px;align-items:center;margin:13px 0}.twofactor-secret code{flex:1;padding:12px 13px;border:1px solid rgba(122,103,241,.24);border-radius:10px;background:#0c0f18;color:#e9e5ff;font-size:15px;letter-spacing:.12em;word-break:break-all}.twofactor-secret button,.recovery-result-head button{border:1px solid rgba(124,108,240,.25);background:rgba(110,91,235,.12);color:#c9c1ff;border-radius:9px;padding:9px 12px;cursor:pointer}.twofactor-step form{display:flex;flex-direction:column;align-items:flex-start}.twofactor-step form input[name="code"]{width:220px;max-width:100%;font-size:22px;letter-spacing:.22em;text-align:center}.twofactor-check{display:flex;align-items:center;gap:9px;margin:12px 0 15px;color:#afb7c9;font-size:12px}.recovery-result{margin-bottom:18px;padding:20px;border:1px solid rgba(255,190,80,.25);border-radius:15px;background:linear-gradient(145deg,rgba(140,91,24,.13),rgba(255,255,255,.015))}.recovery-result-head{display:flex;justify-content:space-between;gap:15px;align-items:center}.recovery-result-head span{font-size:9px;color:#f2b55f;letter-spacing:.12em;font-weight:800}.recovery-result h3{margin:4px 0}.recovery-result p{color:#b1b7c5;font-size:12px}.recovery-code-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:15px}.recovery-code-grid code{padding:10px 12px;border-radius:9px;background:#0c0f16;border:1px solid rgba(255,255,255,.06);color:#f3e4c4;letter-spacing:.08em}.twofactor-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.twofactor-stat-grid article{padding:16px;border:1px solid rgba(255,255,255,.055);border-radius:13px;background:rgba(255,255,255,.018)}.twofactor-stat-grid span{display:block;color:#737d94;font-size:9px;font-weight:800;letter-spacing:.12em}.twofactor-stat-grid strong{display:block;margin:7px 0 3px;color:#f4f5fb;font-size:18px}.twofactor-stat-grid small{color:#8992a5}.trusted-device-list{display:grid;gap:9px}.trusted-device{display:grid;grid-template-columns:42px 1fr auto;gap:12px;align-items:center;padding:12px;border:1px solid rgba(255,255,255,.05);border-radius:12px;background:rgba(255,255,255,.016)}.trusted-device.current{border-color:rgba(92,217,157,.18)}.trusted-device>div:nth-child(2){display:flex;flex-direction:column;gap:3px}.trusted-device>div:nth-child(2)>span,.account-2fa-ok{display:inline-block;width:max-content;padding:2px 6px;border-radius:999px;background:rgba(71,213,148,.12);color:#65dda3;font-size:8px;font-weight:900;letter-spacing:.08em}.trusted-device small{color:#858ea2}.twofactor-inline-form{display:grid;grid-template-columns:1fr 1fr auto;gap:10px}.account-form-hint{margin:10px 0 0;color:#858da0;font-size:11px}.locked-security{border-color:rgba(112,93,235,.16)!important;background:rgba(94,75,218,.055)!important}.locked-security b{color:#c8beff}.locked-security p{color:#949db1}.account-2fa-ok{margin-left:7px}.account-nav button span{min-width:22px;text-align:center}
@media(max-width:760px){.twofactor-intro{grid-template-columns:1fr}.twofactor-lock{width:82px;height:82px}.twofactor-intro ul{grid-template-columns:1fr}.twofactor-stat-grid{grid-template-columns:1fr}.recovery-code-grid{grid-template-columns:1fr}.twofactor-inline-form{grid-template-columns:1fr}.twofactor-required-banner{grid-template-columns:1fr;grid-template-areas:"a" "b" "c"}.twofactor-required-banner strong{margin-top:10px}.trusted-device{grid-template-columns:38px 1fr}.trusted-device button{grid-column:2}.twofactor-step{grid-template-columns:1fr}.twofactor-step>b{width:34px;height:34px}}

.session-verify-warning{border-color:rgba(255,177,67,.2)!important;background:rgba(139,90,20,.075)!important}.session-verify-warning header>b{color:#f0b35f;font-size:10px;letter-spacing:.1em}.session-verify-warning>p{color:#a8afbf;font-size:12px}.twofactor-check.compact{margin:0;align-self:center}


/* BRILL CONNECT v1.7 SSO / OAUTH */
.oauth-flow #app:not(.hidden){visibility:hidden;pointer-events:none}
.oauth-consent-layer{position:fixed;inset:0;z-index:10080;background:radial-gradient(circle at 50% 0%,rgba(111,79,255,.16),transparent 34%),#070910;display:flex;align-items:center;justify-content:center;padding:32px;color:#f3f5ff}
.oauth-consent-shell{width:min(100%,610px)}
.oauth-consent-card{width:min(100%,610px);background:linear-gradient(180deg,#131722,#0d1018);border:1px solid rgba(255,255,255,.09);border-radius:26px;box-shadow:0 36px 100px rgba(0,0,0,.55);padding:28px}
.oauth-consent-brand{display:flex;align-items:center;gap:13px;padding-bottom:24px;border-bottom:1px solid rgba(255,255,255,.07)}
.oauth-brand-mark{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#7c5cff,#4d7dff);font-weight:900;font-size:21px;box-shadow:0 10px 30px rgba(100,82,255,.28)}
.oauth-consent-brand div:last-child{display:grid;gap:2px}.oauth-consent-brand span,.oauth-eyebrow{font-size:10px;letter-spacing:.18em;color:#8f98ad}.oauth-consent-brand strong{font-size:15px}
.oauth-app-head{padding:26px 0 18px}.oauth-app-head>span{font-size:10px;letter-spacing:.17em;color:#8f98ad}.oauth-app-head h1{font-size:28px;margin:7px 0 5px}.oauth-app-head p{margin:0;color:#9da5b8;font-size:13px}.oauth-app-head p strong{color:#f4f5fb}
.oauth-scope-list{display:grid;gap:8px}.oauth-scope-list article{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;background:#0a0d14;border:1px solid rgba(255,255,255,.06)}.oauth-scope-list i{width:32px;height:32px;border-radius:10px;background:rgba(116,90,255,.13);display:grid;place-items:center;color:#9b84ff;font-style:normal;font-weight:800}.oauth-scope-list article div{display:grid;gap:3px}.oauth-scope-list strong{font-size:13px}.oauth-scope-list span{font-size:10px;color:#7f899d}.oauth-scope-list b{font-size:8px;letter-spacing:.1em;color:#58d99b}
.oauth-security-note{display:grid;gap:4px;margin:16px 0;padding:13px 14px;border:1px solid rgba(65,213,147,.15);background:rgba(30,124,84,.08);border-radius:13px}.oauth-security-note strong{font-size:10px;letter-spacing:.14em;color:#67dfa4}.oauth-security-note span{font-size:11px;line-height:1.45;color:#97a3b6}
.oauth-consent-card footer{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}.oauth-consent-card button,.oauth-primary-link{border:0;border-radius:11px;padding:11px 16px;font-weight:750;font-size:12px;cursor:pointer;text-decoration:none}.oauth-primary,.oauth-primary-link{background:linear-gradient(135deg,#7b59ff,#506fff);color:white}.oauth-secondary{background:#1a1f2b;color:#c9cfdb}.oauth-consent-card button:disabled{opacity:.55;cursor:wait}.oauth-redirect{display:block;margin-top:14px;color:#596276;overflow-wrap:anywhere}.oauth-inline-error{margin-top:12px;padding:10px 12px;border-radius:10px;background:rgba(255,70,90,.1);color:#ff8291;font-size:11px}.oauth-error-card{text-align:center}.oauth-error-card .oauth-brand-mark{margin:0 auto 18px}.oauth-error-card h1{margin:8px 0}.oauth-error-card p{color:#a3abba;margin:0 0 22px}
.oauth-app-grid,.oauth-client-list{display:grid;gap:9px}.oauth-app-card,.oauth-client-card{display:flex;align-items:center;gap:12px;padding:13px;border-radius:13px;background:rgba(7,9,14,.58);border:1px solid rgba(255,255,255,.06)}.oauth-app-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:rgba(112,83,255,.14);color:#a18cff;font-weight:900}.oauth-app-copy,.oauth-client-card>div:first-child{display:grid;gap:3px;min-width:0;flex:1}.oauth-app-copy strong,.oauth-client-card strong{font-size:12px}.oauth-app-copy span,.oauth-client-card span{font-size:10px;color:#919aac}.oauth-app-copy small,.oauth-client-card small{font-size:9px;color:#626c80;overflow-wrap:anywhere}.oauth-client-card.disabled{opacity:.55}.oauth-client-actions{display:flex;gap:6px}.oauth-client-actions button{background:#171c27;border:1px solid rgba(255,255,255,.07);color:#aeb6c6;border-radius:8px;padding:7px 9px;font-size:9px;cursor:pointer}
.oauth-secret-once code,.oauth-protocol code{display:block;padding:11px 12px;margin:8px 0;background:#080b11;border:1px solid rgba(255,255,255,.06);border-radius:9px;color:#bcafff;font-size:10px;overflow-wrap:anywhere}.oauth-secret-once p,.oauth-protocol p{color:#7f899d;font-size:10px}
.oauth-client-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.oauth-client-form label{display:grid;gap:6px}.oauth-client-form label>span,.oauth-client-form legend{font-size:9px;letter-spacing:.11em;color:#778196}.oauth-client-form input,.oauth-client-form select,.oauth-client-form textarea{width:100%;background:#090c12;border:1px solid rgba(255,255,255,.08);border-radius:9px;padding:10px;color:#edf0f8;font:inherit}.oauth-client-form .full{grid-column:1/-1}.oauth-client-form fieldset{border:0;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.oauth-scope-check{grid-template-columns:auto 1fr;align-items:center;padding:9px;border-radius:9px;background:rgba(255,255,255,.025)}.oauth-scope-check input{width:auto}.oauth-scope-check span{font-size:10px!important;color:#d8dce5!important}.oauth-scope-check small{grid-column:2;font-size:8px;color:#697287}
@media(max-width:700px){.oauth-consent-layer{padding:14px}.oauth-consent-card{padding:20px;border-radius:20px}.oauth-client-form{grid-template-columns:1fr}.oauth-client-form fieldset{grid-template-columns:1fr}.oauth-scope-list article{grid-template-columns:34px 1fr}.oauth-scope-list article>b{display:none}}

/* ==========================================================
   BRILL CONNECT · FINAL CLIENT UI
   Single visual system for Desktop + PWA + Mobile
   ========================================================== */
:root{
  --bg:#070812;
  --bg-deep:#04050a;
  --panel:#0b0d17;
  --panel-2:#10131f;
  --panel-3:#151928;
  --panel-4:#1a1f31;
  --line:rgba(255,255,255,.072);
  --line-strong:rgba(255,255,255,.125);
  --line-accent:rgba(134,102,255,.34);
  --text:#f7f8ff;
  --text-soft:#d6d9e4;
  --muted:#9299aa;
  --muted-2:#656d7e;
  --muted-3:#414858;
  --accent:#7958f6;
  --accent-2:#a27cff;
  --accent-hot:#b590ff;
  --green:#43e79a;
  --green-soft:rgba(67,231,154,.12);
  --yellow:#f2c45f;
  --red:#ff5669;
  --red-soft:rgba(255,86,105,.10);
  --shadow:0 28px 90px rgba(0,0,0,.52);
  --shadow-soft:0 14px 44px rgba(0,0,0,.28);
  --radius:13px;
  --radius-lg:18px;
  --radius-xl:26px;
  --rail-w:74px;
  --sidebar-w:304px;
  --members-w:286px;
  --topbar-h:64px;
}

html,body{background:#05060b;color:var(--text);}
body{background:
  radial-gradient(circle at 46% -18%,rgba(121,88,246,.08),transparent 32%),
  linear-gradient(180deg,#070812,#05060b 70%);
}
button{transition:color .15s ease,background .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease;}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid rgba(162,124,255,.72);outline-offset:2px;}
.mobile-tablet-only{display:none!important}

/* AUTH — premium, quieter, more product-like */
.auth-screen{grid-template-columns:minmax(0,1.18fr) minmax(430px,.82fr);background:
  radial-gradient(circle at 14% 17%,rgba(121,88,246,.18),transparent 25%),
  radial-gradient(circle at 58% 90%,rgba(45,83,160,.10),transparent 34%),
  #06070d;}
.auth-screen::before{background-image:
  linear-gradient(rgba(255,255,255,.013) 1px,transparent 1px),
  linear-gradient(90deg,rgba(255,255,255,.013) 1px,transparent 1px);background-size:64px 64px;opacity:.7}
.auth-showcase{padding:48px clamp(48px,6vw,104px);}
.auth-brand-mark,.auth-mini-logo,.workspace-brand-mark,.server-logo{background:linear-gradient(145deg,#5539d8,#885ff9 58%,#a679ff);}
.auth-brand-mark{width:48px;height:48px;border-radius:16px;box-shadow:0 18px 50px rgba(113,76,255,.28),inset 0 1px 0 rgba(255,255,255,.19)}
.auth-brand-name{font-size:15px;letter-spacing:.04em}
.auth-brand-sub{font-size:9px;letter-spacing:.18em;color:#70798d}
.auth-hero{max-width:860px;margin-bottom:9vh}
.auth-kicker{color:#ad91ff;font-size:10px}
.auth-hero h1{font-size:clamp(58px,7vw,116px);letter-spacing:-.072em;line-height:.88;text-shadow:0 18px 60px rgba(0,0,0,.25)}
.auth-hero p{max-width:670px;font-size:18px;color:#a9afbd}
.auth-feature-row{max-width:760px;gap:12px}
.auth-feature-row>div{min-height:92px;border-color:rgba(255,255,255,.07);background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.015));box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
.auth-form-side{background:linear-gradient(90deg,rgba(4,5,10,.1),rgba(4,5,10,.32));}
.auth-card{width:min(458px,100%);padding:32px;border-radius:26px;border-color:rgba(255,255,255,.11);background:linear-gradient(160deg,rgba(17,20,32,.98),rgba(8,10,17,.985));box-shadow:0 42px 120px rgba(0,0,0,.56),inset 0 1px 0 rgba(255,255,255,.045)}
.auth-card input{min-height:50px;border-radius:12px;background:#080a11}
.auth-submit{min-height:51px;border-radius:12px;background:linear-gradient(135deg,#6647e7,#8e63ff);box-shadow:0 16px 36px rgba(109,73,235,.24)}
.auth-install-button{width:100%;display:flex;align-items:center;gap:12px;margin-top:12px;padding:12px 14px;border:1px solid rgba(162,124,255,.2);border-radius:13px;color:#dcd5ff;background:rgba(121,88,246,.075);text-align:left}
.auth-install-button:hover{border-color:rgba(162,124,255,.38);background:rgba(121,88,246,.13)}
.auth-install-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.auth-install-button span{min-width:0;display:block}
.auth-install-button b,.auth-install-button small{display:block}
.auth-install-button b{font-size:11px}.auth-install-button small{margin-top:2px;color:#7d8495;font-size:9px}

/* DESKTOP APP SHELL */
.app{grid-template-columns:var(--rail-w) var(--sidebar-w) minmax(500px,1fr) var(--members-w);background:#06070c;}
.server-rail{padding:12px 9px;border-color:rgba(255,255,255,.055);background:linear-gradient(180deg,#04050a,#070812 45%,#05060b)}
.server-logo,.rail-server{width:52px;height:52px;min-width:52px;min-height:52px;border-radius:16px}
.server-logo{font-size:20px;box-shadow:0 14px 36px rgba(110,72,255,.24),inset 0 1px 0 rgba(255,255,255,.15)}
.rail-server{background:#0c0f19;border-color:rgba(255,255,255,.06)}
.rail-server.active{background:linear-gradient(145deg,#19192f,#171326);border-color:rgba(145,107,255,.30);box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 10px 24px rgba(0,0,0,.18)}
.rail-server.active::before{left:-11px;height:32px;background:#a47cff;box-shadow:0 0 22px rgba(164,124,255,.5)}
.rail-status{border-radius:14px;background:#0b0e16}

.sidebar{border-color:rgba(255,255,255,.06);background:linear-gradient(180deg,#090a12,#080911 56%,#06070d)}
.workspace-header{flex-basis:var(--topbar-h);height:var(--topbar-h);padding:0 15px;border-color:rgba(255,255,255,.055);background:rgba(8,9,16,.90);backdrop-filter:blur(18px)}
.workspace-brand-mark{width:36px;height:36px;min-width:36px;border-radius:11px;box-shadow:0 8px 26px rgba(113,76,255,.18)}
.workspace-name{font-size:13px;letter-spacing:.015em}.workspace-sub{font-size:8px;letter-spacing:.16em}
.workspace-card{margin:12px 12px 7px;padding:11px 12px;border-color:rgba(255,255,255,.06);border-radius:13px;background:linear-gradient(135deg,rgba(121,88,246,.09),rgba(255,255,255,.018))}
.workspace-card-main strong{font-size:11px}.workspace-card-main small{font-size:8px}.workspace-live-badge{border-color:rgba(67,231,154,.16);color:#6ef0ae;background:rgba(67,231,154,.075)}
.channel-list{padding:4px 9px 14px}
.channel-category-row{margin-top:11px;padding:0 7px}
.channel-category{font-size:9px;color:#777e90;letter-spacing:.105em}
.channel-button{min-height:38px;margin:2px 0;padding:0 9px;border:1px solid transparent;border-radius:9px;color:#a7adbb;background:transparent}
.channel-button:hover{color:#e6e8ef;background:rgba(255,255,255,.035)}
.channel-button.active{color:#fff;border-color:rgba(151,114,255,.16);background:linear-gradient(90deg,rgba(121,88,246,.18),rgba(121,88,246,.07));box-shadow:inset 3px 0 0 #9e76ff}
.channel-prefix{color:#71798a}.channel-button.active .channel-prefix{color:#b598ff}
.channel-label{font-size:12px;font-weight:650}
.user-panel{min-height:68px;margin:0;padding:10px 10px;border-top-color:rgba(255,255,255,.06);background:rgba(5,6,11,.94)}
.avatar{width:40px;height:40px;min-width:40px;border-radius:12px}.user-name{font-size:12px}
.account-center-button,.logout-button,.user-panel .v04-header-button{width:34px;height:34px;min-width:34px;border-radius:9px}

.chat{grid-template-rows:var(--topbar-h) minmax(0,1fr) auto auto;background:
  radial-gradient(circle at 50% -24%,rgba(121,88,246,.05),transparent 34%),
  linear-gradient(180deg,#080a12,#070811)}
.chat-header{height:var(--topbar-h);padding:0 18px;border-color:rgba(255,255,255,.06);background:rgba(7,8,14,.92);backdrop-filter:blur(22px) saturate(120%)}
.chat-header::after{left:24%;right:24%;background:linear-gradient(90deg,transparent,rgba(145,107,255,.16),transparent)}
.channel-symbol{width:34px;height:34px;min-width:34px;border-radius:10px;border:0;background:transparent;color:#8c94a7}
.channel-symbol svg{width:19px;height:19px}
.channel-title{font-size:15px;font-weight:760}.channel-description{margin-top:2px;font-size:9px;color:#666e7e;text-transform:none;letter-spacing:.02em}
.header-actions{gap:6px}.v04-header-button,.notification-button,.header-install-button,.members-toggle{width:34px;height:34px;min-width:34px;border:1px solid transparent;border-radius:9px;color:#8a91a2;background:transparent}
.v04-header-button:hover,.notification-button:hover,.header-install-button:hover,.members-toggle:hover{color:#fff;border-color:rgba(255,255,255,.065);background:rgba(255,255,255,.045)}
.header-install-button svg,.members-toggle svg,.notification-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.online-counter{height:31px;border-color:rgba(255,255,255,.055);border-radius:9px;background:rgba(255,255,255,.018);color:#7b8293}
.owner-button,.moderation-button{height:31px;border-radius:9px;padding:0 10px;font-size:8px}
.header-actions>.notification-button:not(#notificationButton){display:none!important}

.messages{padding:26px clamp(18px,3.4vw,48px) 16px;scroll-padding-bottom:90px}
.message{max-width:1120px;grid-template-columns:46px minmax(0,1fr);gap:12px;margin:1px auto;padding:9px 10px;border-radius:10px}
.message:hover{background:rgba(255,255,255,.018)}
.message-avatar{width:42px;height:42px;border-radius:50%;border-color:rgba(255,255,255,.08);background:#151927}
.message-author{font-size:13.5px}.message-time{font-size:9px;color:#646b7b}.message-body{margin-top:3px;font-size:14.5px;line-height:1.55;color:#e3e5eb}
.message-role{min-height:17px;border-radius:5px;font-size:7.5px}
.reply-preview{max-width:780px;background:rgba(121,88,246,.035)}
.reaction-chip,.reaction-add{min-height:28px;border-radius:8px;background:#0e111b}
.message-attachments img{border-radius:12px}
.message-v03-actions{position:absolute;right:10px;top:-14px;margin:0;padding:4px;border:1px solid rgba(255,255,255,.07);border-radius:9px;background:#10131e;box-shadow:var(--shadow-soft);z-index:3}
.message-v03-actions button{min-height:28px}
.empty-channel{max-width:1120px;padding-bottom:42px}.empty-icon{border-radius:18px}.empty-channel h2{font-size:30px}
.typing{max-width:1120px;width:calc(100% - 40px);padding-left:0;color:#707789}
.composer-wrap{padding:0 clamp(18px,3.4vw,48px) 18px;background:linear-gradient(180deg,transparent,rgba(7,8,17,.96) 35%)}
.composer-wrap>*{max-width:1120px}.composer{min-height:58px;border-color:rgba(255,255,255,.08);border-radius:13px;background:linear-gradient(180deg,#121521,#0f121c);box-shadow:0 14px 44px rgba(0,0,0,.26),inset 0 1px 0 rgba(255,255,255,.025)}
.composer:focus-within{border-color:rgba(145,107,255,.30);box-shadow:0 16px 48px rgba(0,0,0,.3),0 0 0 1px rgba(145,107,255,.04)}
.composer textarea{font-size:14px}.attach-button{background:#171a26}.send-button{background:linear-gradient(135deg,#6648e8,#8d62ff)}

.members{border-color:rgba(255,255,255,.055);background:linear-gradient(180deg,#080911,#07080e)}
.members-header{height:var(--topbar-h);padding:0 16px;border-color:rgba(255,255,255,.055);background:rgba(8,9,15,.9)}
.member-list{height:calc(100% - var(--topbar-h));padding:7px 10px 20px}.member-role{padding:18px 8px 7px;color:#787f90}
.member{min-height:50px;padding:6px 8px;border-radius:9px}.member:hover{background:rgba(255,255,255,.026)}
.member-avatar{width:36px;height:36px;border-radius:50%}.presence-dot{border-color:#080911}.member-name{font-size:12.5px}.member-status{font-size:9px}

/* Voice dock and voice experience */
.voice-dock{margin:0 10px 9px;border-radius:12px;border-color:rgba(67,231,154,.14);background:linear-gradient(145deg,#0b1516,#0a0d14)}
.voice-dock-actions button,#v05Dock{border-radius:8px;background:#11151f}
.brill-voice{padding:26px 28px 22px;background:radial-gradient(circle at 50% 10%,rgba(121,88,246,.10),transparent 31%),#070811}
.brill-voice-card{border-radius:20px;background:linear-gradient(145deg,#111522,#0a0c14);box-shadow:0 30px 90px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.035)}
.voice-room-empty{border-radius:16px;background:#0d1019}
.call-stage,.call-dock,.thread-panel,.group-editor-card{box-shadow:0 26px 90px rgba(0,0,0,.40)}

/* All major consoles should feel like one product */
.owner-console,.moderation-console,.notification-console,.v04-modal,.v05-panel,.profile-card,.profile-editor,.account-center,.oauth-consent-card{border-color:rgba(255,255,255,.105)!important;background:linear-gradient(155deg,#11141f,#080a11)!important;box-shadow:0 34px 120px rgba(0,0,0,.58)!important}
.owner-console,.moderation-console,.notification-console{border-radius:18px!important}
.owner-tabs,.moderation-tabs,.notification-tabs{background:rgba(255,255,255,.012)}
.owner-tab.active,.moderation-tab.active,.notification-tab.active{background:rgba(121,88,246,.13)!important;border-color:rgba(145,107,255,.18)!important}

/* PWA install */
.install-sheet{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:20px}
.install-sheet-backdrop{position:absolute;inset:0;background:rgba(2,3,7,.80);backdrop-filter:blur(18px)}
.install-sheet-card{position:relative;z-index:1;width:min(440px,100%);padding:30px;border:1px solid rgba(255,255,255,.12);border-radius:24px;background:linear-gradient(155deg,#131622,#080a11);box-shadow:0 42px 130px rgba(0,0,0,.62);text-align:center}
.install-sheet-close{position:absolute;right:15px;top:15px;width:34px;height:34px;border:1px solid rgba(255,255,255,.07);border-radius:10px;color:#8c93a3;background:#10131c;font-size:20px}
.install-sheet-logo{width:72px;height:72px;display:grid;place-items:center;margin:0 auto 18px;border:1px solid rgba(180,153,255,.3);border-radius:22px;color:#fff;background:linear-gradient(145deg,#5639d8,#9368ff);box-shadow:0 18px 45px rgba(111,72,255,.28);font-size:28px;font-weight:900}
.install-sheet-kicker{color:#a78cff;font-size:9px;font-weight:900;letter-spacing:.16em}.install-sheet-card h2{margin:8px 0 8px;font-size:25px;letter-spacing:-.03em}.install-sheet-card>p{margin:0 auto;color:#8d94a4;font-size:12px;line-height:1.6;max-width:340px}.install-sheet-steps{display:grid;gap:8px;margin:20px 0;text-align:left}.install-step{display:flex;align-items:flex-start;gap:10px;padding:11px;border:1px solid rgba(255,255,255,.06);border-radius:12px;background:rgba(255,255,255,.02)}.install-step b{width:24px;height:24px;min-width:24px;display:grid;place-items:center;border-radius:8px;color:#cfc4ff;background:rgba(121,88,246,.13);font-size:10px}.install-step span{color:#c9cdd7;font-size:11px;line-height:1.45}.install-sheet-action{width:100%;min-height:48px;border:0;border-radius:12px;color:#fff;background:linear-gradient(135deg,#6546e6,#8e62ff);font-size:12px;font-weight:800;box-shadow:0 14px 32px rgba(111,72,255,.22)}.install-sheet-card>small{display:block;margin-top:14px;color:#5f6675;font-size:9px}
.connection-toast{position:fixed;z-index:90000;left:50%;top:16px;transform:translateX(-50%);display:grid;grid-template-columns:8px auto;column-gap:9px;align-items:center;padding:10px 13px;border:1px solid rgba(255,86,105,.18);border-radius:11px;background:rgba(18,10,14,.94);box-shadow:0 15px 45px rgba(0,0,0,.4);backdrop-filter:blur(14px)}.connection-toast span{grid-row:1/3;width:8px;height:8px;border-radius:50%;background:var(--red);box-shadow:0 0 12px rgba(255,86,105,.45)}.connection-toast b{font-size:10px}.connection-toast small{color:#8c7a80;font-size:8px}

/* Mobile navigation shell */
.mobile-backdrop{position:fixed;inset:0;z-index:89;background:rgba(2,3,7,.6);backdrop-filter:blur(4px)}
.mobile-nav{position:fixed;z-index:80;left:0;right:0;bottom:0;height:calc(66px + env(safe-area-inset-bottom));padding:7px 8px calc(7px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,1fr);gap:2px;border-top:1px solid rgba(255,255,255,.075);background:rgba(7,8,14,.94);backdrop-filter:blur(22px) saturate(130%)}
.mobile-nav button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;border-radius:10px;color:#71798b;background:transparent;font-size:8px;font-weight:700}.mobile-nav button:hover,.mobile-nav button.active{color:#d9d2ff;background:rgba(121,88,246,.08)}.mobile-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.mobile-nav-primary{color:#a789ff!important}.mobile-nav i{position:absolute;right:calc(50% - 16px);top:5px;width:7px;height:7px;border:2px solid #080910;border-radius:50%;background:#ff5d70}

/* TABLET */
@media (max-width:1320px){
  :root{--sidebar-w:286px}
  .app{grid-template-columns:70px var(--sidebar-w) minmax(0,1fr)}
  .members{display:none}
  .mobile-tablet-only{display:grid!important}
  body.members-open .members{position:fixed;z-index:95;display:block;right:0;top:0;bottom:0;width:min(310px,88vw);box-shadow:-30px 0 90px rgba(0,0,0,.52)}
  body.members-open .mobile-backdrop{display:block!important}
}

/* MOBILE */
@media (max-width:760px){
  :root{--topbar-h:58px}
  html,body{height:100dvh;min-height:100dvh}
  body{overscroll-behavior:none}
  .auth-screen{height:100dvh;min-height:100dvh;background:radial-gradient(circle at 50% -10%,rgba(121,88,246,.18),transparent 35%),#06070d}
  .auth-showcase{padding:calc(18px + env(safe-area-inset-top)) 18px 6px}.auth-brand{justify-content:center}.auth-brand-mark{width:42px;height:42px;border-radius:14px}.auth-brand-name{font-size:13px}.auth-brand-sub{font-size:8px}
  .auth-form-side{padding:12px 14px calc(24px + env(safe-area-inset-bottom));place-items:start center}.auth-card{margin-top:6px;padding:22px 18px;border-radius:20px}.auth-card-head{display:none}.auth-tabs{margin:0 0 22px}.auth-form-title h2{font-size:23px}.auth-card input{min-height:49px}.auth-submit{min-height:50px}.auth-install-button{display:flex}
  .app{height:100dvh;grid-template-columns:1fr;padding-bottom:calc(66px + env(safe-area-inset-bottom))}
  .server-rail{display:none}.sidebar{z-index:100;width:min(330px,90vw);padding-top:env(safe-area-inset-top)}
  body.sidebar-open .mobile-backdrop{display:block!important}
  .chat{height:calc(100dvh - 66px - env(safe-area-inset-bottom));grid-template-rows:var(--topbar-h) minmax(0,1fr) auto auto}
  .chat-header{padding:0 9px 0 7px}.header-left{gap:7px}.channel-symbol{width:31px;height:31px;min-width:31px}.channel-title{font-size:13.5px}.channel-description{display:none}.header-actions{gap:2px}.header-actions .online-counter,.header-actions .owner-button,.header-actions .moderation-button,.header-actions .v04-header-button{display:none!important}.members-toggle{display:grid!important}.notification-button,.header-install-button,.members-toggle{width:32px;height:32px;min-width:32px}.header-install-button{display:none!important}
  .messages{padding:18px 6px 10px}.message{grid-template-columns:39px minmax(0,1fr);gap:9px;padding:7px 7px}.message-avatar{width:37px;height:37px}.message-author{font-size:12.5px}.message-body{font-size:13.5px;line-height:1.5}.message-time{font-size:8px}.message-role{font-size:7px}.message-v03-actions{position:static;margin-top:5px;padding:0;border:0;background:transparent;box-shadow:none;opacity:1}.message-v03-actions button{background:rgba(255,255,255,.025)}
  .typing{width:100%;min-height:20px;padding:2px 13px 0}.composer-wrap{padding:0 8px 9px}.composer{min-height:52px;padding:7px;border-radius:12px}.composer textarea{font-size:16px;min-height:34px;padding:7px 2px}.composer-tools{display:none}.attach-button,.send-button{width:36px;height:36px;min-width:36px}
  .members{padding-top:env(safe-area-inset-top)}
  .mobile-nav{display:grid!important}
  .mobile-backdrop{bottom:calc(66px + env(safe-area-inset-bottom))}
  body.sidebar-open .sidebar{bottom:calc(66px + env(safe-area-inset-bottom))}
  body.members-open .members{bottom:calc(66px + env(safe-area-inset-bottom));top:0;padding-top:env(safe-area-inset-top)}
  .voice-placeholder{grid-row:2/5}.brill-voice{padding:13px 9px 10px}.brill-voice-card{padding:48px 16px 18px;border-radius:17px}.voice-room-empty{padding:17px;border-radius:14px}.voice-room-capabilities{grid-template-columns:1fr}.voice-users{grid-template-columns:1fr}
  .v04-overlay,.v05-overlay,.modal{padding:0}.v04-modal,.owner-console,.moderation-console,.notification-console{width:100%!important;height:100%!important;max-height:none!important;border:0!important;border-radius:0!important}.owner-tabs,.moderation-tabs,.notification-tabs{overflow-x:auto;white-space:nowrap;scrollbar-width:none}.owner-tabs::-webkit-scrollbar,.moderation-tabs::-webkit-scrollbar,.notification-tabs::-webkit-scrollbar{display:none}
  .profile-layer,.account-layer,.oauth-consent-layer{padding:0!important}.profile-card,.profile-editor,.account-center{width:100vw!important;height:100dvh!important;max-height:none!important;border:0!important;border-radius:0!important}
  .install-sheet{align-items:end;padding:0}.install-sheet-card{width:100%;padding:26px 20px calc(22px + env(safe-area-inset-bottom));border-width:1px 0 0;border-radius:24px 24px 0 0}.install-sheet-logo{width:62px;height:62px;border-radius:19px}
  .connection-toast{top:calc(8px + env(safe-area-inset-top));width:calc(100% - 24px)}
}

@media (max-width:430px){
  .auth-showcase{padding-left:14px;padding-right:14px}.auth-brand{justify-content:flex-start}.auth-form-side{padding-left:10px;padding-right:10px}.auth-card{padding:20px 16px}.auth-form-title{margin-bottom:20px}.auth-card label{margin:14px 0}
  .channel-title{max-width:132px}.notification-button{display:grid!important}.members-toggle{display:grid!important}
  .message{grid-template-columns:34px minmax(0,1fr)}.message-avatar{width:33px;height:33px}.message-body{font-size:13px}.reaction-chip,.reaction-add{min-height:27px;padding:0 7px}
}

/* standalone-installed mode */
@media (display-mode:standalone){
  body{user-select:none}.messages,.message-body,textarea,input{user-select:text}
  .auth-install-button,.header-install-button{display:none!important}
  .server-rail{padding-top:calc(12px + env(safe-area-inset-top))}
}


/* ==========================================================
   BRILL CONNECT · COMPLETE CLIENT FIX
   Functional rail + screen sharing in calls and voice rooms
   ========================================================== */
.rail-server.rail-add{cursor:pointer;color:#9da5ba;background:#0c0f18;border-style:solid}
.rail-server.rail-add:hover{color:#fff;border-color:rgba(143,106,255,.48);background:rgba(121,88,246,.15);transform:translateY(-1px)}
.server-logo,.rail-server{cursor:pointer}
.server-logo:active,.rail-server:active{transform:scale(.96)}
.voice-dock-actions{display:flex;gap:6px;flex-wrap:wrap}
#voiceDockShare.active,.voice-share.active{color:#fff!important;border-color:rgba(157,122,255,.55)!important;background:rgba(121,88,246,.18)!important;box-shadow:0 0 0 1px rgba(121,88,246,.08) inset}
#voiceDockShare:disabled,.voice-share:disabled{opacity:.4;cursor:not-allowed}
.voice-screen-stage{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:0 0 14px}
.voice-screen-card{position:relative;min-height:280px;overflow:hidden;border:1px solid rgba(154,121,255,.24);border-radius:17px;background:#03040a;box-shadow:0 26px 80px rgba(0,0,0,.38)}
.voice-screen-card video{display:block;width:100%;height:min(62vh,720px);min-height:280px;object-fit:contain;background:#020308}
.voice-screen-label{position:absolute;left:12px;bottom:12px;display:grid;grid-template-columns:8px auto;gap:1px 8px;align-items:center;padding:8px 10px;border:1px solid rgba(255,255,255,.09);border-radius:10px;background:rgba(6,8,14,.82);backdrop-filter:blur(14px)}
.voice-screen-label .voice-screen-live{grid-row:1/3;width:8px;height:8px;border-radius:50%;background:#43e79a;box-shadow:0 0 14px rgba(67,231,154,.5)}
.voice-screen-label strong{font-size:11px}.voice-screen-label small{font-size:8px;letter-spacing:.12em;color:#8d96aa}
.call-screen-presentation-v12{display:grid;gap:10px;margin:0 0 12px}
.call-screen-share-v12{position:relative;overflow:hidden;border:1px solid rgba(154,121,255,.25);border-radius:15px;background:#020308;box-shadow:0 24px 70px rgba(0,0,0,.36)}
.call-screen-share-v12 video{display:block;width:100%;height:min(58vh,680px);min-height:280px;object-fit:contain;background:#020308}
.call-screen-share-label-v12{position:absolute;left:12px;bottom:12px;display:grid;grid-template-columns:8px auto;gap:0 8px;align-items:center;padding:8px 10px;border:1px solid rgba(255,255,255,.09);border-radius:10px;background:rgba(6,8,14,.84);backdrop-filter:blur(14px)}
.call-screen-share-label-v12>span{grid-row:1/3;width:8px;height:8px;border-radius:50%;background:#43e79a;box-shadow:0 0 13px rgba(67,231,154,.48)}
.call-screen-share-label-v12 strong{font-size:11px}.call-screen-share-label-v12 small{font-size:8px;letter-spacing:.12em;color:#8d96aa}
.call-control-v12:disabled{opacity:.42;cursor:not-allowed}
@media(max-width:760px){
  .voice-screen-card,.call-screen-share-v12{border-radius:11px}
  .voice-screen-card video,.call-screen-share-v12 video{height:42vh;min-height:210px}
}

/* ==========================================================
   BRILL CONNECT · PRODUCTION CLIENT VISUAL SYSTEM
   ========================================================== */
:root{
  --bc-bg:#05060a;--bc-surface:#090b12;--bc-surface-2:#0d1019;--bc-line:rgba(255,255,255,.075);
  --bc-text:#f5f7ff;--bc-muted:#81899d;--bc-violet:#8b63ff;--bc-blue:#3b8cff;--bc-green:#43e49a;
  --bc-share-fit:contain;
}
html,body{background:var(--bc-bg)!important}
body{font-feature-settings:"ss01" 1,"cv02" 1;text-rendering:optimizeLegibility}
.app{background:var(--bc-bg)!important;grid-template-columns:74px 296px minmax(0,1fr) 286px!important}
.server-rail{background:#05060b!important;border-right:1px solid var(--bc-line)!important;padding:14px 10px!important}
.server-logo,.rail-server{width:52px!important;height:52px!important;border-radius:17px!important}
.server-logo{background:linear-gradient(145deg,#7350ff,#9b6cff)!important;box-shadow:0 14px 40px rgba(116,78,255,.23)!important}
.rail-server.active{border-color:rgba(139,99,255,.55)!important;background:#11101c!important}
.sidebar{background:#080a10!important;border-right:1px solid var(--bc-line)!important}
.workspace-header{height:68px!important;border-bottom:1px solid var(--bc-line)!important}
.workspace-card{margin:12px 12px 7px!important;border-radius:14px!important;background:linear-gradient(140deg,rgba(27,31,45,.96),rgba(12,15,24,.96))!important}
.channel-list{padding:7px 9px 122px!important}
.channel-button{min-height:39px!important;border-radius:9px!important;margin:1px 0!important;font-size:13px!important}
.channel-button:hover{background:rgba(255,255,255,.045)!important}.channel-button.active{background:rgba(139,99,255,.13)!important;color:#fff!important}
.user-panel{background:#070910!important;border-top:1px solid var(--bc-line)!important}
.chat{background:radial-gradient(circle at 60% -20%,rgba(68,91,180,.05),transparent 42%),#070910!important}
.chat-header{height:68px!important;border-bottom:1px solid var(--bc-line)!important;background:rgba(7,9,16,.96)!important}
.channel-title{font-size:14px!important;font-weight:800!important}.channel-description{color:#687186!important}
.messages{padding:18px clamp(12px,2.3vw,36px) 18px!important;scrollbar-gutter:stable;contain:layout style}
.message{max-width:1180px;margin:0 auto!important;border-radius:9px!important;content-visibility:auto;contain-intrinsic-size:72px}
.message:hover{background:rgba(255,255,255,.024)!important}.message-body{font-size:14px!important;line-height:1.58!important;color:#dce1ec!important}
.composer-wrap{padding:0 clamp(12px,2.3vw,36px) 18px!important}.composer{max-width:1180px;margin:0 auto!important;border-radius:14px!important;background:#10131d!important;border:1px solid rgba(255,255,255,.08)!important}
.members{background:#080a10!important;border-left:1px solid var(--bc-line)!important}.member{content-visibility:auto;contain-intrinsic-size:48px}
.bc-history-notice{display:block;margin:6px auto 18px;padding:8px 13px;border:1px solid rgba(139,99,255,.18);border-radius:999px;background:rgba(139,99,255,.06);color:#9e96bd;font-size:10px;font-weight:800;cursor:pointer}

/* Immersive screen-share workspace. It occupies the application viewport,
   not the chat column. */
body.bc-share-active{overflow:hidden!important}
body.bc-share-active .voice-screen-stage:not(.hidden),body.bc-share-active .call-screen-presentation-v12{
  position:fixed!important;inset:0!important;z-index:300!important;margin:0!important;padding:72px 18px 18px!important;
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;background:#010205!important;
}
body.bc-share-active .voice-screen-card,body.bc-share-active .call-screen-share-v12{
  position:relative!important;width:100%!important;height:100%!important;min-height:0!important;border:0!important;border-radius:12px!important;
  background:#010205!important;box-shadow:none!important;overflow:hidden!important;
}
body.bc-share-active .voice-screen-card video,body.bc-share-active .call-screen-share-v12 video{
  width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;object-fit:var(--bc-share-fit)!important;background:#010205!important;
}
body.bc-share-active .bc-share-secondary{display:none!important}
.bc-share-bar{position:fixed;z-index:330;top:0;left:0;right:0;height:60px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0 16px;border-bottom:1px solid rgba(255,255,255,.08);background:rgba(5,7,12,.96);box-shadow:0 18px 50px rgba(0,0,0,.35)}
.bc-share-bar.hidden{display:none!important}.bc-share-brand{display:flex;align-items:center;gap:10px;min-width:0}.bc-share-brand>span{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(145deg,#7450ff,#9a68ff);font-weight:950}.bc-share-brand>div{display:flex;flex-direction:column;min-width:0}.bc-share-brand small{font-size:8px;letter-spacing:.16em;color:#717b90;font-weight:900}.bc-share-brand strong{font-size:12px;white-space:nowrap}.bc-share-brand>i{width:7px;height:7px;border-radius:50%;background:var(--bc-green);box-shadow:0 0 13px rgba(67,228,154,.55)}
.bc-share-actions{display:flex;gap:7px;align-items:center}.bc-share-actions button{height:34px;padding:0 12px;border:1px solid rgba(255,255,255,.09);border-radius:9px;background:#0d1018;color:#c8cfdd;font-size:10px;font-weight:800;cursor:pointer}.bc-share-actions button:hover{background:#151927;color:#fff}.bc-share-actions .danger{border-color:rgba(255,81,104,.24);color:#ff8798;background:rgba(255,81,104,.08)}
body.bc-share-minimized .voice-screen-stage:not(.hidden),body.bc-share-minimized .call-screen-presentation-v12{inset:auto 18px 18px auto!important;width:min(480px,42vw)!important;height:min(300px,28vw)!important;padding:0!important;z-index:325!important;border:1px solid rgba(139,99,255,.28);border-radius:14px!important;box-shadow:0 30px 100px rgba(0,0,0,.65)!important}
body.bc-share-minimized .bc-share-bar{top:auto;bottom:326px;left:auto;right:18px;width:min(480px,42vw);height:46px;border:1px solid rgba(255,255,255,.08);border-radius:12px}.bc-share-minimized .bc-share-brand>div,.bc-share-minimized .bc-share-actions button:not([data-share-mini]):not([data-share-stop]){display:none}

/* Mobile native-like workspace: solid backgrounds and transform-only panels avoid
   expensive blur/repaint loops on mid-range Android devices. */
.bc-mobile-stage{display:none}.bc-avatar{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:13px;background-size:cover;background-position:center;background-color:#171a27;color:#fff;font-weight:900}.bc-avatar.large{width:82px;height:82px;flex-basis:82px;border-radius:26px;border:4px solid #080a10;font-size:23px}
@media(max-width:760px){
  *{-webkit-tap-highlight-color:transparent}
  html,body{height:100dvh!important;overflow:hidden!important}
  .app{height:100dvh!important;grid-template-columns:1fr!important;padding-bottom:calc(72px + env(safe-area-inset-bottom))!important}
  .server-rail{display:none!important}.members{display:none!important}
  .chat{height:calc(100dvh - 72px - env(safe-area-inset-bottom))!important;grid-template-rows:58px minmax(0,1fr) auto auto!important}
  .chat-header{height:58px!important;padding:env(safe-area-inset-top) 10px 0!important;background:#070910!important;backdrop-filter:none!important}
  .messages{padding:12px 7px 8px!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;contain:strict}
  .message{grid-template-columns:35px minmax(0,1fr)!important;gap:8px!important;padding:7px!important;contain:layout paint style;content-visibility:auto;contain-intrinsic-size:68px}
  .message-avatar{width:34px!important;height:34px!important}.message-body{font-size:13.5px!important;line-height:1.52!important}.message-role{display:none!important}
  .composer-wrap{padding:0 8px 8px!important}.composer{min-height:50px!important;border-radius:13px!important;background:#0e111a!important}.composer textarea{font-size:16px!important}
  .mobile-nav{height:calc(72px + env(safe-area-inset-bottom))!important;padding:6px 7px calc(6px + env(safe-area-inset-bottom))!important;background:#07080e!important;backdrop-filter:none!important;border-top:1px solid rgba(255,255,255,.08)!important;contain:layout paint}
  .mobile-nav button{min-width:0;border-radius:12px!important;font-size:9px!important;transition:background .12s ease,color .12s ease!important}.mobile-nav button.active{background:rgba(139,99,255,.11)!important;color:#b49bff!important}.mobile-nav svg{width:22px!important;height:22px!important}
  .mobile-backdrop{display:none!important;backdrop-filter:none!important}
  .sidebar{position:fixed!important;z-index:110!important;inset:0 0 calc(72px + env(safe-area-inset-bottom)) 0!important;width:100%!important;transform:translate3d(-100%,0,0)!important;transition:transform .16s cubic-bezier(.2,.8,.2,1)!important;background:#080a10!important;box-shadow:none!important;will-change:transform;contain:layout paint}
  body.sidebar-open .sidebar{transform:translate3d(0,0,0)!important}.workspace-header{padding-top:env(safe-area-inset-top)!important;height:calc(66px + env(safe-area-inset-top))!important}.channel-list{padding-bottom:100px!important;overflow:auto!important;overscroll-behavior:contain}.user-panel{position:absolute!important;left:0;right:0;bottom:0!important}
  .bc-mobile-stage{position:fixed;z-index:105;inset:0 0 calc(72px + env(safe-area-inset-bottom)) 0;display:grid;grid-template-rows:calc(62px + env(safe-area-inset-top)) minmax(0,1fr);background:#070910;contain:strict}.bc-mobile-stage.hidden{display:none!important}
  .bc-mobile-stage-head{display:flex;align-items:end;justify-content:space-between;padding:env(safe-area-inset-top) 16px 11px;border-bottom:1px solid rgba(255,255,255,.07);background:#070910}.bc-mobile-stage-head>div{display:flex;flex-direction:column}.bc-mobile-stage-head small{font-size:8px;letter-spacing:.17em;color:#6f7890;font-weight:900}.bc-mobile-stage-head strong{font-size:18px;line-height:1.2}.bc-mobile-stage-head button{width:34px;height:34px;border:1px solid rgba(255,255,255,.08);border-radius:11px;background:#0d1018;color:#aab2c2;font-size:22px}
  .bc-mobile-stage-content{overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px;contain:layout paint style}.bc-mobile-block{padding:4px 0 16px}.bc-mobile-section-title{height:32px;display:flex;align-items:center;justify-content:space-between;color:#8d95a8}.bc-mobile-section-title strong{font-size:10px;letter-spacing:.13em;text-transform:uppercase}.bc-mobile-section-title span{font-size:10px}
  .bc-mobile-search,.bc-people-search{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:7px;padding:7px 8px;border:1px solid rgba(255,255,255,.075);border-radius:13px;background:#0d1018}.bc-mobile-search svg{width:19px;height:19px;fill:none;stroke:#737d92;stroke-width:1.8}.bc-mobile-search input,.bc-people-search input{min-width:0;height:34px;border:0;background:transparent;color:#fff;font:inherit;outline:0}.bc-mobile-search button{height:33px;padding:0 11px;border:0;border-radius:9px;background:#7350e9;color:#fff;font-size:10px;font-weight:800}.bc-mobile-search-results{margin-top:8px}
  .bc-person-row{width:100%;min-height:61px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 7px;border:0;border-bottom:1px solid rgba(255,255,255,.05);background:transparent;color:#fff;text-align:left;content-visibility:auto;contain-intrinsic-size:62px}.bc-person-row>div:not(.bc-row-actions){min-width:0;display:flex;flex-direction:column}.bc-person-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.bc-person-row small{margin-top:3px;color:#727b8e;font-size:10px}.bc-person-row>button,.bc-row-actions button{height:32px;padding:0 10px;border:1px solid rgba(139,99,255,.2);border-radius:9px;background:rgba(139,99,255,.1);color:#c8b8ff;font-size:9px;font-weight:850}.bc-row-actions{display:flex!important;flex-direction:row!important;gap:5px}.bc-row-actions .ghost{width:32px;padding:0;border-color:rgba(255,255,255,.07);background:#0d1018;color:#8b94a7}.bc-person-button>span:last-child{font-size:22px;color:#667086}
  .bc-inbox-row{position:relative;display:grid;grid-template-columns:38px minmax(0,1fr) 8px;gap:10px;padding:12px 8px;border-bottom:1px solid rgba(255,255,255,.055);content-visibility:auto;contain-intrinsic-size:82px}.bc-inbox-row.unread{background:linear-gradient(90deg,rgba(139,99,255,.07),transparent)}.bc-inbox-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#111522;color:#a88cff;font-weight:900}.bc-inbox-row>div{min-width:0}.bc-inbox-row small{display:block;color:#727c91;font-size:8px;text-transform:uppercase;letter-spacing:.1em}.bc-inbox-row strong{display:block;margin-top:2px;font-size:12px}.bc-inbox-row p{margin:3px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#929aad;font-size:10.5px}.bc-inbox-row>i{align-self:center;width:7px;height:7px;border-radius:50%;background:#8c64ff;box-shadow:0 0 12px rgba(140,100,255,.6)}
  .bc-mobile-empty{min-height:220px;display:grid;place-items:center;align-content:center;text-align:center;padding:25px;color:#758096}.bc-mobile-empty>span{width:50px;height:50px;display:grid;place-items:center;border-radius:17px;background:#121624;color:#9878ff;font-weight:950}.bc-mobile-empty strong{margin-top:12px;color:#dce2ee}.bc-mobile-empty p{max-width:270px;margin:6px 0 0;font-size:11px;line-height:1.5}
  .bc-mobile-skeletons{display:grid;gap:8px;padding:6px}.bc-mobile-skeletons i{height:62px;border-radius:13px;background:linear-gradient(90deg,#0d1018,#121622,#0d1018);background-size:200% 100%;animation:bc-shimmer 1.2s linear infinite}@keyframes bc-shimmer{to{background-position:-200% 0}}
  .bc-people-search{grid-template-columns:1fr;margin-bottom:8px}.bc-people-list{contain:layout paint style}
  .bc-mobile-profile{overflow:hidden;border:1px solid rgba(255,255,255,.07);border-radius:19px;background:#0a0d15}.bc-profile-banner{height:116px;background:radial-gradient(circle at 78% 20%,rgba(77,136,255,.3),transparent 28%),linear-gradient(135deg,#17132b,#111a2e 55%,#0b0d14)}.bc-profile-identity{display:flex;align-items:end;gap:12px;margin-top:-39px;padding:0 16px}.bc-profile-identity>div{min-width:0;padding-bottom:6px}.bc-profile-identity strong{display:block;font-size:18px}.bc-profile-identity small{color:#727c91}.bc-profile-status{display:flex;align-items:center;gap:8px;margin:15px 16px;padding:9px 10px;border-radius:10px;background:#0d111b;color:#a3abbb;font-size:11px}.bc-profile-status i{width:7px;height:7px;border-radius:50%;background:#43e49a}.bc-profile-grid{display:grid;gap:6px;padding:0 12px 12px}.bc-profile-grid button{display:grid;grid-template-columns:minmax(0,1fr) auto;text-align:left;padding:11px 12px;border:1px solid rgba(255,255,255,.055);border-radius:11px;background:#0d1018;color:#fff}.bc-profile-grid button small{grid-column:1;font-size:7px;letter-spacing:.13em;color:#657086}.bc-profile-grid button strong{grid-column:1;font-size:11px;margin-top:2px}.bc-profile-grid button span{grid-column:2;grid-row:1/3;align-self:center;color:#6f7890;font-size:20px}.bc-mobile-role-row{display:flex;flex-wrap:wrap;gap:5px;padding:0 14px 15px}.bc-mobile-role-row span{padding:5px 8px;border:1px solid color-mix(in srgb,var(--role) 35%,transparent);border-radius:999px;background:color-mix(in srgb,var(--role) 10%,transparent);color:var(--role);font-size:8px;font-weight:800}
  body.bc-share-active .voice-screen-stage:not(.hidden),body.bc-share-active .call-screen-presentation-v12{padding:58px 0 calc(72px + env(safe-area-inset-bottom))!important;border-radius:0!important}.bc-share-bar{height:52px;padding:0 8px calc(0px + env(safe-area-inset-top));top:0}.bc-share-brand>div{display:none}.bc-share-actions{gap:4px;overflow-x:auto}.bc-share-actions button{height:32px;padding:0 9px;white-space:nowrap;font-size:8px}.bc-share-actions button[data-share-pip]{display:none}.bc-share-actions button[data-share-fit]{display:none}body.bc-share-minimized .voice-screen-stage:not(.hidden),body.bc-share-minimized .call-screen-presentation-v12{right:8px!important;bottom:calc(80px + env(safe-area-inset-bottom))!important;width:52vw!important;height:30vw!important}.bc-share-minimized .bc-share-bar{display:none!important}
  .modal,.v04-overlay,.v05-overlay,.profile-layer,.account-layer{animation:none!important;backdrop-filter:none!important}
}
@media(max-width:1320px) and (min-width:761px){.app{grid-template-columns:74px 290px minmax(0,1fr)!important}.members{display:none!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;transition-duration:.001ms!important}}

/* BRILL CONNECT · SELF PREVIEW BLOCKED · PRODUCTION HOTFIX */
.bc-share-bar.bc-share-local-only{
  top:14px;left:50%;right:auto;width:auto;min-width:360px;height:48px;
  transform:translateX(-50%);border:1px solid rgba(67,228,154,.22);border-radius:14px;
  background:rgba(7,10,16,.96);box-shadow:0 18px 60px rgba(0,0,0,.42);
}
.bc-share-bar.bc-share-local-only .bc-share-brand>i{background:#43e49a}
.bc-share-bar.bc-share-local-only .bc-share-actions button[hidden]{display:none!important}
.bc-share-bar.bc-share-local-only [data-share-stop]{height:32px}
@media(max-width:760px){
  .bc-share-bar.bc-share-local-only{top:calc(8px + env(safe-area-inset-top));left:8px;right:8px;width:auto;min-width:0;transform:none;height:46px}
  .bc-share-bar.bc-share-local-only .bc-share-brand>div{display:flex!important}
  .bc-share-bar.bc-share-local-only .bc-share-brand small{display:none}
}


/* ==========================================================
   BRILL CONNECT · SPACES / ORGANIZATIONS
   ========================================================== */
.space-rail-list{display:flex;flex-direction:column;align-items:center;width:100%}
.rail-space img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.rail-space span{max-width:42px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-card-actions{display:flex;align-items:center;gap:7px}.workspace-settings-button{width:28px;height:28px;border-radius:9px;border:1px solid rgba(255,255,255,.08);background:#0b0e17;color:#aeb7c8;cursor:pointer}.workspace-settings-button:hover{color:#fff;border-color:rgba(139,99,255,.5)}
.mobile-space-switcher{display:none}
.space-dialog-layer{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:22px}.space-dialog-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.76);backdrop-filter:blur(12px)}.space-dialog{position:relative;width:min(780px,96vw);max-height:min(820px,92vh);overflow:auto;border:1px solid rgba(255,255,255,.09);border-radius:22px;background:linear-gradient(180deg,#10131d,#090b12);box-shadow:0 35px 120px rgba(0,0,0,.62);color:#eef2ff}.space-dialog>header{display:flex;align-items:center;justify-content:space-between;padding:23px 25px;border-bottom:1px solid rgba(255,255,255,.07)}.space-dialog>header small{display:block;color:#8c95a9;font-size:9px;font-weight:900;letter-spacing:.18em}.space-dialog>header h2{margin:6px 0 0;font-size:22px}.space-dialog>header>button{width:36px;height:36px;border:0;border-radius:11px;background:#171b27;color:#aeb6c8;font-size:23px;cursor:pointer}.space-dialog-body{padding:24px}.space-form{display:grid;gap:17px}.space-form label>span{display:block;margin-bottom:8px;color:#939db1;font-size:9px;font-weight:900;letter-spacing:.13em}.space-form input,.space-form select,.space-form textarea,.space-member-add select{width:100%;box-sizing:border-box;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:#090c14;color:#eef2ff;padding:12px 13px;outline:none}.space-form textarea{min-height:86px;resize:vertical}.space-form input:focus,.space-form select:focus,.space-form textarea:focus{border-color:rgba(139,99,255,.65);box-shadow:0 0 0 3px rgba(139,99,255,.1)}.space-form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.space-template-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.space-template-grid label{cursor:pointer}.space-template-grid input{position:absolute;opacity:0;pointer-events:none}.space-template-grid label>span{display:flex;align-items:center;gap:10px;margin:0;padding:13px;border:1px solid rgba(255,255,255,.07);border-radius:13px;background:#0b0e17}.space-template-grid label>span b{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#17132a;color:#a98cff}.space-template-grid input:checked+span{border-color:rgba(139,99,255,.62);background:rgba(109,76,212,.13);box-shadow:inset 0 0 0 1px rgba(139,99,255,.12)}.space-template-grid label>span strong{font-size:11px}.space-form-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:4px}.space-primary,.space-secondary,.space-member-add button{border:1px solid rgba(255,255,255,.08);border-radius:11px;padding:10px 15px;font-weight:800;cursor:pointer}.space-primary,.space-member-add button{background:#7958f6;color:white;border-color:#8f73ff}.space-secondary{background:#121621;color:#b4bdcd}.space-form-error{padding:11px 13px;border:1px solid rgba(255,80,90,.28);border-radius:11px;background:rgba(255,60,70,.08);color:#ff9aa1}.space-settings-tabs{display:flex;gap:7px;margin-bottom:15px}.space-settings-tabs button{padding:9px 12px;border:1px solid rgba(255,255,255,.07);border-radius:10px;background:#0c0f18;color:#aab3c4;cursor:pointer}.space-settings-tabs button.active{color:#fff;border-color:rgba(139,99,255,.45);background:rgba(121,88,246,.13)}.space-settings-card{border:1px solid rgba(255,255,255,.07);border-radius:16px;background:#0b0e16;overflow:hidden}.space-settings-head{display:flex;align-items:flex-start;justify-content:space-between;padding:18px;border-bottom:1px solid rgba(255,255,255,.06)}.space-settings-head small{color:#9b82ff;font-size:9px;font-weight:900;letter-spacing:.15em}.space-settings-head h3{margin:5px 0;font-size:18px}.space-settings-head p{margin:0;color:#8e98aa;font-size:11px}.space-settings-head>span{font-size:10px;color:#8f99ac}.space-member-add{display:grid;grid-template-columns:1fr 150px auto;gap:8px;padding:13px;border-bottom:1px solid rgba(255,255,255,.06)}.space-member-list{max-height:380px;overflow:auto}.space-member-row{display:grid;grid-template-columns:38px minmax(0,1fr) 140px auto;gap:10px;align-items:center;padding:11px 13px;border-bottom:1px solid rgba(255,255,255,.045)}.space-member-avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#1a1531;color:#b8a6ff;font-size:11px;font-weight:900}.space-member-main strong{display:block;font-size:11px}.space-member-main small{display:block;margin-top:3px;color:#727d90;font-size:9px}.space-member-row select{border:1px solid rgba(255,255,255,.07);border-radius:9px;background:#090c13;color:#b9c1d0;padding:8px}.space-member-remove{width:30px;height:30px;border:1px solid rgba(255,80,90,.18);border-radius:9px;background:rgba(255,70,80,.06);color:#ff858e;cursor:pointer}.space-owner-badge{padding:6px 8px;border-radius:8px;background:rgba(139,99,255,.12);color:#b9a8ff;font-size:8px;font-weight:900}.space-danger-zone{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px;background:rgba(255,60,70,.035)}.space-danger-zone strong{display:block;color:#ff9aa2;font-size:11px}.space-danger-zone small{display:block;margin-top:4px;color:#7d8595;font-size:9px}.space-danger-zone button{border:1px solid rgba(255,70,80,.28);border-radius:10px;background:rgba(255,70,80,.08);color:#ff929a;padding:9px 12px;cursor:pointer}
@media(max-width:760px){.mobile-space-switcher{display:flex;gap:8px;overflow-x:auto;padding:8px 12px 4px;scrollbar-width:none}.mobile-space-switcher::-webkit-scrollbar{display:none}.mobile-space-chip{flex:0 0 auto;display:flex;align-items:center;gap:7px;border:1px solid rgba(255,255,255,.07);border-radius:12px;background:#0b0e16;color:#939cae;padding:7px 10px}.mobile-space-chip span{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#18142b;color:#aa91ff;font-size:8px;font-weight:900}.mobile-space-chip b{font-size:9px}.mobile-space-chip.active{border-color:rgba(139,99,255,.48);background:rgba(121,88,246,.12);color:#fff}.space-dialog-layer{padding:0;align-items:end}.space-dialog{width:100%;max-height:92dvh;border-radius:22px 22px 0 0}.space-dialog-body{padding:16px}.space-template-grid{grid-template-columns:1fr 1fr}.space-form-row{grid-template-columns:1fr}.space-member-add{grid-template-columns:1fr 115px}.space-member-add button{grid-column:1/-1}.space-member-row{grid-template-columns:38px minmax(0,1fr) 100px auto}.workspace-settings-button{display:grid!important}.workspace-settings-button.hidden{display:none!important}}

/* =========================================================
   BRILL CONNECT · OWNER CONTROL PRO
   ========================================================= */
.owner-console{
  width:min(1320px,calc(100% - 48px));
  height:min(900px,calc(100% - 48px));
  border-color:rgba(155,139,255,.16);
  background:
    radial-gradient(circle at 12% 0%,rgba(118,88,246,.09),transparent 28%),
    linear-gradient(180deg,#0d111b 0%,#090c14 100%);
  box-shadow:0 38px 110px rgba(0,0,0,.58),inset 0 1px 0 rgba(255,255,255,.025);
}
.owner-console-header{height:92px;padding:0 30px;background:rgba(255,255,255,.008)}
.owner-console-header h2{font-size:22px;letter-spacing:-.02em}
.owner-eyebrow{font-size:9px;letter-spacing:.19em;color:#9d8dff}
.owner-tabs{gap:8px;padding:13px 26px;border-bottom:1px solid rgba(255,255,255,.055);background:rgba(5,8,14,.36)}
.owner-tab{position:relative;min-height:42px;padding:0 15px;border-radius:11px;color:#7f899d;font-size:10px;font-weight:760;transition:.15s ease}
.owner-tab:hover{color:#c9cede;background:rgba(255,255,255,.025)}
.owner-tab.active{color:#fff;border-color:rgba(137,108,255,.25);background:linear-gradient(180deg,rgba(128,91,255,.18),rgba(95,72,205,.1));box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.owner-tab.active::after{content:"";position:absolute;left:14px;right:14px;bottom:-14px;height:2px;border-radius:9px;background:#8d6cff;box-shadow:0 0 16px rgba(141,108,255,.8)}
#ownerContent{height:calc(100% - 147px);padding:24px 28px 30px;scrollbar-color:rgba(137,108,255,.35) transparent}

.owner-pro-loading{min-height:280px;display:flex;align-items:center;justify-content:center;gap:16px;color:#8d96aa}
.owner-pro-loading strong{display:block;margin-bottom:5px;color:#dfe3ef;font-size:13px}
.owner-pro-loading span{font-size:10px}
.owner-pro-spinner{width:32px;height:32px;border:2px solid rgba(255,255,255,.08);border-top-color:#8d6cff;border-radius:50%;animation:ownerSpin .7s linear infinite}
@keyframes ownerSpin{to{transform:rotate(360deg)}}

.owner-pro-error{min-height:260px;display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:18px;align-items:center;padding:32px;border:1px solid rgba(255,113,129,.16);border-radius:20px;background:linear-gradient(135deg,rgba(255,89,111,.045),rgba(255,255,255,.012))}
.owner-pro-error-icon{display:grid;place-items:center;width:52px;height:52px;border:1px solid rgba(255,109,126,.2);border-radius:16px;color:#ff8b99;background:rgba(255,89,111,.08);font-size:22px;font-weight:900}
.owner-pro-error-copy span,.owner-pro-kicker,.owner-pro-titlebar>div:first-child>span,.owner-pro-panel header span,.owner-pro-create-card>div>span,.owner-pro-table-panel>header>div>span{color:#9184fa;font-size:8px;font-weight:900;letter-spacing:.16em}
.owner-pro-error-copy h3{margin:7px 0 6px;font-size:17px}.owner-pro-error-copy p{margin:0;color:#8993a6;font-size:11px}
.owner-pro-error-actions{display:flex;gap:8px}

.owner-pro-primary,.owner-pro-secondary,.owner-pro-row-danger,.owner-pro-panel header button,.owner-pro-security button{min-height:38px;padding:0 13px;border-radius:10px;font-size:9px;font-weight:820;transition:.15s ease}
.owner-pro-primary{border:1px solid rgba(149,119,255,.36);color:#fff;background:linear-gradient(180deg,#7f5cf0,#6847d8);box-shadow:0 8px 28px rgba(96,66,213,.18)}
.owner-pro-primary:hover{filter:brightness(1.08)}
.owner-pro-secondary,.owner-pro-panel header button{border:1px solid rgba(255,255,255,.07);color:#bac1cf;background:rgba(255,255,255,.025)}
.owner-pro-secondary:hover,.owner-pro-panel header button:hover{border-color:rgba(138,108,255,.22);color:#fff;background:rgba(121,88,246,.07)}
.owner-pro-row-danger{border:1px solid rgba(255,100,116,.18);color:#ff9daa;background:rgba(255,85,105,.06)}
.owner-pro-row-danger:hover{background:rgba(255,85,105,.1)}
button:disabled{opacity:.45;cursor:not-allowed}

.owner-pro-dashboard,.owner-pro-page{display:grid;gap:18px}
.owner-pro-hero{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:24px 26px;border:1px solid rgba(139,110,255,.14);border-radius:20px;background:linear-gradient(135deg,rgba(117,83,238,.085),rgba(255,255,255,.012) 45%,rgba(52,207,153,.025));overflow:hidden}
.owner-pro-hero h3,.owner-pro-titlebar h3{margin:7px 0 7px;color:#f1f3f8;font-size:24px;letter-spacing:-.03em}
.owner-pro-hero p,.owner-pro-titlebar p{max-width:720px;margin:0;color:#8791a4;font-size:11px;line-height:1.65}
.owner-pro-security{display:grid;grid-template-columns:10px minmax(180px,1fr) auto;gap:10px;align-items:center;min-width:330px;padding:13px 14px;border:1px solid rgba(255,255,255,.06);border-radius:14px;background:rgba(3,6,11,.45)}
.owner-pro-security>i{width:8px;height:8px;border-radius:50%;background:#4fdc9a;box-shadow:0 0 14px rgba(79,220,154,.7)}
.owner-pro-security.warn>i{background:#ffbd5c;box-shadow:0 0 14px rgba(255,189,92,.6)}
.owner-pro-security.danger>i{background:#ff6576;box-shadow:0 0 14px rgba(255,101,118,.6)}
.owner-pro-security strong{display:block;color:#d7dce8;font-size:8px;letter-spacing:.12em}.owner-pro-security span{display:block;margin-top:3px;color:#7e899d;font-size:9px;line-height:1.35}
.owner-pro-security button{border:1px solid rgba(255,189,92,.18);color:#ffc775;background:rgba(255,189,92,.07)}

.owner-pro-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.owner-pro-metrics article{position:relative;min-width:0;padding:17px 18px;border:1px solid rgba(255,255,255,.055);border-radius:15px;background:rgba(255,255,255,.018);overflow:hidden}
.owner-pro-metrics article::before{content:"";position:absolute;inset:0 0 auto;height:1px;background:linear-gradient(90deg,transparent,rgba(139,109,255,.3),transparent)}
.owner-pro-metrics span{display:block;color:#69758a;font-size:7px;font-weight:900;letter-spacing:.14em}
.owner-pro-metrics strong{display:block;margin:8px 0 4px;color:#f0f2f8;font-size:24px;letter-spacing:-.04em}
.owner-pro-metrics small{display:block;color:#768196;font-size:8px}.owner-pro-metrics small b{color:#58dfa1;font-weight:800}

.owner-pro-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);gap:14px}
.owner-pro-panel,.owner-pro-table-panel{border:1px solid rgba(255,255,255,.055);border-radius:18px;background:rgba(255,255,255,.014);overflow:hidden}
.owner-pro-panel>header,.owner-pro-table-panel>header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;border-bottom:1px solid rgba(255,255,255,.05)}
.owner-pro-panel h4,.owner-pro-table-panel h4{margin:4px 0 0;color:#e8ebf2;font-size:13px}
.owner-pro-space-list{display:grid;padding:6px}.owner-pro-space-list article{display:grid;grid-template-columns:38px minmax(0,1fr) 78px 70px;gap:11px;align-items:center;padding:11px 12px;border-radius:12px}.owner-pro-space-list article:hover{background:rgba(255,255,255,.023)}
.owner-pro-space-mark{display:grid;place-items:center;width:36px;height:36px;border:1px solid rgba(137,108,255,.2);border-radius:11px;color:#d8d1ff;background:rgba(117,83,238,.1);font-size:9px;font-weight:900}.owner-pro-space-list article>div:nth-child(2) strong{display:block;color:#dfe3ec;font-size:10px}.owner-pro-space-list article>div:nth-child(2) span{display:block;margin-top:3px;color:#677287;font-size:7px;letter-spacing:.06em}
.owner-pro-space-stats{text-align:right}.owner-pro-space-stats b{display:block;color:#cbd1df;font-size:10px}.owner-pro-space-stats span{color:#687386;font-size:7px}
.owner-pro-event-list{display:grid;padding:8px 10px}.owner-pro-event-list article{display:grid;grid-template-columns:8px 1fr;gap:10px;align-items:start;padding:10px 8px;border-bottom:1px solid rgba(255,255,255,.035)}.owner-pro-event-list article:last-child{border-bottom:0}.owner-pro-event-list i{width:6px;height:6px;margin-top:4px;border-radius:50%;background:#7f6bf1;box-shadow:0 0 10px rgba(127,107,241,.5)}.owner-pro-event-list strong{display:block;color:#cfd5e1;font-size:9px}.owner-pro-event-list span{display:block;margin-top:3px;color:#687488;font-size:8px}
.owner-pro-empty{padding:28px;text-align:center;color:#6f7b90;font-size:10px}.owner-pro-empty.table{border-top:1px solid rgba(255,255,255,.04)}

.owner-pro-titlebar{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:5px 2px 2px}.owner-pro-titlebar h3{font-size:21px}.owner-pro-title-stat{display:grid;min-width:110px;padding:12px 16px;border:1px solid rgba(255,255,255,.06);border-radius:13px;text-align:right;background:rgba(255,255,255,.018)}.owner-pro-title-stat strong{color:#eceef6;font-size:20px}.owner-pro-title-stat span{color:#69758a;font-size:8px}
.owner-pro-create-card{display:grid;grid-template-columns:minmax(220px,1fr) minmax(520px,1.8fr);gap:22px;align-items:end;padding:18px 20px;border:1px solid rgba(137,108,255,.12);border-radius:17px;background:linear-gradient(135deg,rgba(117,83,238,.055),rgba(255,255,255,.012))}.owner-pro-create-card>div strong{display:block;margin:6px 0 4px;color:#e6e9f1;font-size:13px}.owner-pro-create-card>div small{color:#778296;font-size:9px}.owner-pro-create-card form{display:grid;grid-template-columns:1fr 1fr auto;gap:9px;align-items:end}.owner-pro-create-card label{display:grid;gap:5px}.owner-pro-create-card label>span{color:#687489;font-size:7px;font-weight:900;letter-spacing:.12em}
.owner-pro-create-card select,.owner-pro-toolbar select,.owner-pro-user-actions select,.owner-pro-table-panel input,.owner-pro-search input{width:100%;min-height:38px;border:1px solid rgba(255,255,255,.07);border-radius:10px;outline:0;color:#dce1eb;background:#090d15;font-size:9px}.owner-pro-create-card select,.owner-pro-toolbar select,.owner-pro-user-actions select{padding:0 11px}
.owner-pro-toolbar{display:flex;gap:9px;align-items:center}.owner-pro-search{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;flex:1;border:1px solid rgba(255,255,255,.07);border-radius:11px;background:#090d15}.owner-pro-search>span{text-align:center;color:#707b90}.owner-pro-search input{border:0;background:transparent}.owner-pro-toolbar>select{width:190px}
.owner-pro-table-panel>header input{width:240px;padding:0 11px}
.owner-pro-table{min-width:920px}.owner-pro-table-head,.owner-pro-table-row{display:grid;grid-template-columns:1.3fr 1.2fr 1fr 1fr .8fr .7fr;gap:12px;align-items:center}.owner-pro-table-head{padding:10px 16px;color:#5f6b80;font-size:7px;font-weight:900;letter-spacing:.12em;background:rgba(255,255,255,.01)}.owner-pro-table-row{min-height:58px;padding:9px 16px;border-top:1px solid rgba(255,255,255,.045);color:#8b96a8;font-size:9px}.owner-pro-table-row:hover{background:rgba(255,255,255,.015)}.owner-pro-table-row strong{color:#d8dde7;font-size:9px}.owner-pro-code{display:flex;gap:8px;align-items:center}.owner-pro-code code{color:#b8afff;font-size:9px}.owner-pro-code button{height:28px;padding:0 8px;border:1px solid rgba(137,108,255,.12);border-radius:8px;color:#978df2;background:rgba(137,108,255,.05);font-size:7px}.owner-pro-status{display:inline-flex;align-items:center;justify-content:center;min-height:25px;padding:0 8px;border-radius:999px;font-size:7px;font-weight:900;letter-spacing:.08em}.owner-pro-status.active{color:#6de5aa;background:rgba(59,208,143,.08);border:1px solid rgba(59,208,143,.15)}.owner-pro-status.used{color:#86b8ff;background:rgba(87,149,255,.07);border:1px solid rgba(87,149,255,.14)}.owner-pro-status.expired,.owner-pro-status.revoked{color:#8993a6;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.06)}

.owner-pro-user-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.owner-pro-user-card{padding:15px;border:1px solid rgba(255,255,255,.055);border-radius:16px;background:rgba(255,255,255,.014)}.owner-pro-user-card:hover{border-color:rgba(137,108,255,.14);background:rgba(137,108,255,.018)}.owner-pro-user-top{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center}.owner-pro-user-avatar{position:relative;display:grid;place-items:center;width:40px;height:40px;border:1px solid rgba(137,108,255,.16);border-radius:12px;color:#dad5ff;background:rgba(117,83,238,.1);font-size:10px;font-weight:900}.owner-pro-user-avatar i{position:absolute;right:-2px;bottom:-2px;width:9px;height:9px;border:2px solid #0d1119;border-radius:50%;background:#475164}.owner-pro-user-avatar i.online{background:#46dc98}.owner-pro-user-top>div:nth-child(2) strong{display:block;color:#e0e4ed;font-size:10px}.owner-pro-user-top>div:nth-child(2) span{display:block;margin-top:4px;color:#69758a;font-size:8px}.owner-pro-user-state{padding:5px 7px;border-radius:7px;color:#79849a;background:rgba(255,255,255,.025);font-size:7px;font-weight:900}.owner-pro-user-state.online{color:#65dfa5;background:rgba(70,216,151,.07)}.owner-pro-user-state.banned{color:#ff8795;background:rgba(255,91,110,.07)}.owner-pro-user-tags{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.owner-pro-user-tags b,.owner-pro-user-tags i{padding:4px 7px;border-radius:7px;font-size:7px;font-style:normal}.owner-pro-user-tags b{color:#c9c2ff;background:rgba(117,83,238,.08)}.owner-pro-user-tags i{color:var(--tag);background:color-mix(in srgb,var(--tag) 8%,transparent);border:1px solid color-mix(in srgb,var(--tag) 14%,transparent)}.owner-pro-user-actions{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px;align-items:end}.owner-pro-user-actions label{display:grid;gap:4px}.owner-pro-user-actions label span{color:#616d82;font-size:7px;font-weight:900;letter-spacing:.1em}

.owner-pro-audit{border:1px solid rgba(255,255,255,.055);border-radius:17px;background:rgba(255,255,255,.012);overflow:hidden}.owner-pro-audit-row{display:grid;grid-template-columns:10px 155px minmax(0,1fr) auto;gap:13px;align-items:center;min-height:62px;padding:10px 16px;border-bottom:1px solid rgba(255,255,255,.04)}.owner-pro-audit-row:last-child{border-bottom:0}.owner-pro-audit-row:hover{background:rgba(255,255,255,.014)}.owner-pro-audit-dot{width:6px;height:6px;border-radius:50%;background:#806cf0;box-shadow:0 0 10px rgba(128,108,240,.55)}.owner-pro-audit-time strong{display:block;color:#9ba5b7;font-size:8px}.owner-pro-audit-time span{display:block;margin-top:3px;color:#59657a;font-size:7px}.owner-pro-audit-main strong{display:block;color:#d4d9e4;font-size:9px}.owner-pro-audit-main span{display:block;max-width:700px;margin-top:4px;color:#687489;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.owner-pro-audit-row code{max-width:180px;overflow:hidden;text-overflow:ellipsis;color:#8e82ec;font-size:7px}

/* Existing Structure / Roles become part of the same command-center visual language. */
.structure-manager,.roles-manager{padding:0!important}.structure-hero,.roles-hero{border-color:rgba(137,108,255,.13)!important;border-radius:18px!important;background:linear-gradient(135deg,rgba(117,83,238,.06),rgba(255,255,255,.012))!important}.structure-category-card,.roles-panel{border-color:rgba(255,255,255,.055)!important;background:rgba(255,255,255,.014)!important}.structure-channel-row,.role-manager-row,.role-user-row{border-color:rgba(255,255,255,.05)!important;background:rgba(255,255,255,.012)!important}.structure-channel-row:hover,.role-manager-row:hover,.role-user-row:hover{border-color:rgba(137,108,255,.13)!important;background:rgba(137,108,255,.025)!important}

@media (max-width:1100px){.owner-pro-metrics{grid-template-columns:repeat(3,1fr)}.owner-pro-grid{grid-template-columns:1fr}.owner-pro-create-card{grid-template-columns:1fr}.owner-pro-user-grid{grid-template-columns:1fr}.owner-pro-security{min-width:280px}}
@media (max-width:760px){
  .owner-console{width:100%!important;height:100%!important;border-radius:0!important}.owner-console-header{height:74px;padding:0 16px}.owner-tabs{padding:8px 10px}.owner-tab.active::after{bottom:-9px}#ownerContent{height:calc(100% - 125px);padding:14px 12px 90px}.owner-pro-hero{align-items:flex-start;flex-direction:column;padding:18px}.owner-pro-hero h3,.owner-pro-titlebar h3{font-size:20px}.owner-pro-security{width:100%;min-width:0}.owner-pro-metrics{grid-template-columns:repeat(2,1fr)}.owner-pro-titlebar{align-items:flex-start}.owner-pro-title-stat{min-width:86px}.owner-pro-create-card{gap:14px;padding:15px}.owner-pro-create-card form{grid-template-columns:1fr 1fr}.owner-pro-create-card form button{grid-column:1/-1}.owner-pro-toolbar{align-items:stretch;flex-direction:column}.owner-pro-toolbar>select{width:100%}.owner-pro-table-panel{overflow:auto}.owner-pro-user-actions{grid-template-columns:1fr 1fr}.owner-pro-user-actions label{grid-column:1/-1}.owner-pro-audit-row{grid-template-columns:8px 110px minmax(0,1fr)}.owner-pro-audit-row code{display:none}.owner-pro-error{grid-template-columns:42px 1fr;padding:20px}.owner-pro-error-actions{grid-column:1/-1}.owner-pro-space-list article{grid-template-columns:36px minmax(0,1fr) 58px}.owner-pro-space-stats:last-child{display:none}}
.owner-console-subtitle{margin:5px 0 0;color:#5f6a7f;font-size:8px;letter-spacing:.06em}

/* ==========================================================
   BRILL CONNECT · PROFESSIONAL STRUCTURE SYSTEM
   Desktop shell + hierarchy + responsive polish
   ========================================================== */
:root{
  --bc-shell-bg:#06070b;
  --bc-shell-surface:#0a0c12;
  --bc-shell-surface-2:#0d1018;
  --bc-shell-surface-3:#111520;
  --bc-shell-line:rgba(255,255,255,.065);
  --bc-shell-line-strong:rgba(255,255,255,.11);
  --bc-shell-text:#f6f7fb;
  --bc-shell-muted:#858da0;
  --bc-shell-dim:#596276;
  --bc-shell-purple:#8b63ff;
  --bc-shell-purple-2:#a98cff;
  --bc-shell-green:#43e79a;
  --bc-shell-shadow:0 22px 70px rgba(0,0,0,.30);
  --bc-shell-topbar:72px;
}

@media (min-width:761px){
  .app{
    grid-template-columns:84px 326px minmax(0,1fr) 306px!important;
    background:var(--bc-shell-bg)!important;
  }

  /* Global space rail */
  .server-rail{
    padding:16px 12px!important;
    border-right:1px solid var(--bc-shell-line)!important;
    background:
      radial-gradient(circle at 50% 2%,rgba(139,99,255,.12),transparent 18%),
      linear-gradient(180deg,#05060a 0%,#06070b 100%)!important;
  }
  .server-logo,.rail-server{
    width:56px!important;height:56px!important;min-width:56px!important;min-height:56px!important;
    border-radius:18px!important;
    border:1px solid rgba(255,255,255,.065)!important;
    transition:transform .16s ease,border-radius .16s ease,border-color .16s ease,background .16s ease!important;
  }
  .server-logo{
    background:linear-gradient(145deg,#714cf1,#9a6dff)!important;
    box-shadow:0 14px 36px rgba(111,72,244,.24),inset 0 1px 0 rgba(255,255,255,.17)!important;
  }
  .rail-server{background:#0d1017!important;color:#a5adbc!important}
  .rail-server:hover{border-radius:15px!important;border-color:rgba(164,134,255,.26)!important;background:#121622!important;color:#fff!important}
  .rail-server.active{
    border-color:rgba(166,132,255,.36)!important;
    background:linear-gradient(145deg,#171829,#11131e)!important;
    box-shadow:0 10px 28px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.04)!important;
  }
  .rail-server.active::before{left:-13px!important;width:4px!important;height:34px!important;border-radius:0 5px 5px 0!important;background:#a77cff!important}
  .rail-add{border-style:dashed!important;color:#737d91!important;background:rgba(255,255,255,.018)!important}
  .rail-add:hover{color:#dcd6ff!important;border-color:rgba(153,118,255,.38)!important;background:rgba(139,99,255,.08)!important}
  .rail-divider{width:38px!important;margin:14px 0!important;background:rgba(255,255,255,.08)!important}
  .rail-status{width:44px!important;height:44px!important;border-radius:14px!important;background:#0b0e15!important}

  /* Workspace / channels sidebar */
  .sidebar{
    border-right:1px solid var(--bc-shell-line)!important;
    background:linear-gradient(180deg,#090b11 0%,#080a10 65%,#07080d 100%)!important;
  }
  .workspace-header{
    flex:0 0 var(--bc-shell-topbar)!important;height:var(--bc-shell-topbar)!important;
    padding:0 18px!important;
    border-bottom:1px solid var(--bc-shell-line)!important;
    background:#090b11!important;
    backdrop-filter:none!important;
  }
  .workspace-brand-mark{width:38px!important;height:38px!important;min-width:38px!important;border-radius:12px!important;font-size:14px!important}
  .workspace-name{font-size:14px!important;font-weight:900!important;letter-spacing:.015em!important}
  .workspace-sub{margin-top:4px!important;color:#626b7f!important;font-size:8px!important;letter-spacing:.18em!important}

  .workspace-card{
    flex:0 0 76px!important;
    margin:14px 13px 6px!important;
    padding:0 14px!important;
    border:1px solid rgba(255,255,255,.07)!important;
    border-radius:16px!important;
    background:
      radial-gradient(circle at 0 0,rgba(139,99,255,.12),transparent 42%),
      linear-gradient(145deg,#111521,#0d1018)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
  }
  .workspace-card-main{gap:11px!important}
  .workspace-card strong{font-size:12px!important;font-weight:850!important;letter-spacing:.025em!important}
  .workspace-card small{font-size:8px!important;color:#687287!important;letter-spacing:.1em!important}
  .workspace-live-dot{width:8px!important;height:8px!important;flex-basis:8px!important}
  .workspace-live-badge{padding:5px 8px!important;font-size:8px!important;border-radius:999px!important}
  .workspace-settings-button{width:31px!important;height:31px!important;border-radius:10px!important}

  .channel-list{padding:7px 10px 128px!important}
  .channel-category-row{min-height:38px!important;margin:8px 0 1px!important;padding:0 7px!important}
  .channel-category{
    padding:0!important;
    color:#6c7588!important;
    font-size:9px!important;font-weight:900!important;letter-spacing:.13em!important;
  }
  .channel-category::before{color:#4b5465!important}
  .channel-category-add{
    width:26px!important;height:26px!important;border-radius:8px!important;
    border:1px solid transparent!important;
    color:#6f788b!important;background:transparent!important;
  }
  .channel-category-add:hover{color:#d7d0ff!important;border-color:rgba(153,118,255,.20)!important;background:rgba(139,99,255,.07)!important}
  .channel-button{
    min-height:43px!important;
    margin:2px 0!important;
    padding:0 11px!important;
    border-radius:11px!important;
    color:#98a0b0!important;
    font-size:13px!important;font-weight:650!important;
  }
  .channel-button:hover{color:#eef0f5!important;background:rgba(255,255,255,.035)!important;border-color:rgba(255,255,255,.025)!important}
  .channel-button.active{
    color:#fff!important;
    border-color:rgba(159,124,255,.17)!important;
    background:linear-gradient(90deg,rgba(139,99,255,.17),rgba(139,99,255,.065))!important;
    box-shadow:inset 3px 0 0 #9c76ff!important;
  }
  .channel-button[data-channel-type="voice"].active{
    border-color:rgba(67,231,154,.12)!important;
    background:linear-gradient(90deg,rgba(67,231,154,.085),rgba(67,231,154,.025))!important;
    box-shadow:inset 3px 0 0 var(--bc-shell-green)!important;
  }
  .channel-prefix{width:23px!important;min-width:23px!important;color:#697285!important}
  .channel-label{font-size:13px!important;font-weight:650!important}
  .v05-occupancy{margin-left:42px!important;border-left-color:rgba(255,255,255,.055)!important}

  /* Current user card */
  .user-panel{
    flex:0 0 78px!important;
    gap:10px!important;
    padding:10px 12px!important;
    border-top:1px solid var(--bc-shell-line)!important;
    background:#07090e!important;
    box-shadow:0 -14px 30px rgba(0,0,0,.10)!important;
  }
  .avatar{width:43px!important;height:43px!important;min-width:43px!important;border-radius:13px!important}
  .user-name{font-size:12.5px!important;font-weight:800!important}
  .user-panel-info select{color:#6f788b!important;font-size:9px!important}
  .account-center-button,.logout-button,.user-panel .v04-header-button{width:34px!important;height:34px!important;min-width:34px!important;border-radius:10px!important}

  /* Main conversation canvas */
  .chat{
    position:relative!important;
    grid-template-rows:var(--bc-shell-topbar) minmax(0,1fr) auto auto!important;
    background:
      radial-gradient(circle at 50% -14%,rgba(93,72,190,.055),transparent 31%),
      linear-gradient(180deg,#090b11 0%,#080a10 100%)!important;
  }
  .chat::before{
    content:"";position:absolute;inset:var(--bc-shell-topbar) 0 0;pointer-events:none;opacity:.16;
    background-image:linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.014) 1px,transparent 1px);
    background-size:64px 64px;mask-image:linear-gradient(to bottom,rgba(0,0,0,.45),transparent 58%);
  }
  .chat-header{
    height:var(--bc-shell-topbar)!important;
    padding:0 22px!important;
    border-bottom:1px solid var(--bc-shell-line)!important;
    background:#090b11!important;
    backdrop-filter:none!important;
    z-index:3!important;
  }
  .chat-header::after{display:none!important}
  .header-left{gap:11px!important}
  .channel-symbol{width:36px!important;height:36px!important;min-width:36px!important;border-radius:11px!important;color:#8c95a7!important;background:rgba(255,255,255,.018)!important}
  .channel-title{font-size:15px!important;font-weight:850!important;letter-spacing:-.01em!important}
  .channel-description{margin-top:3px!important;color:#626b7d!important;font-size:9px!important}
  .header-actions{gap:7px!important}
  .v04-header-button,.notification-button,.header-install-button,.members-toggle{
    width:36px!important;height:36px!important;min-width:36px!important;
    border:1px solid rgba(255,255,255,.055)!important;border-radius:11px!important;
    color:#818a9d!important;background:#0c0f16!important;
  }
  .v04-header-button:hover,.notification-button:hover,.header-install-button:hover,.members-toggle:hover{color:#fff!important;border-color:rgba(154,120,255,.18)!important;background:#111520!important}
  .online-counter{height:34px!important;padding:0 11px!important;border-radius:10px!important;background:#0c0f16!important}
  .moderation-button,.owner-button{height:34px!important;padding:0 12px!important;border-radius:10px!important;font-size:8px!important;font-weight:900!important;letter-spacing:.045em!important}

  .messages{
    position:relative!important;z-index:1!important;
    padding:30px clamp(24px,3.2vw,52px) 18px!important;
    scroll-padding-bottom:110px!important;
  }
  .message{
    max-width:1060px!important;
    grid-template-columns:46px minmax(0,1fr)!important;
    gap:13px!important;
    margin:1px auto!important;
    padding:10px 12px!important;
    border-radius:12px!important;
  }
  .message:hover{background:rgba(255,255,255,.021)!important}
  .message-avatar{width:42px!important;height:42px!important;border-radius:14px!important}
  .message-author{font-size:13.5px!important;font-weight:800!important}
  .message-time{font-size:9px!important;color:#5d6677!important}
  .message-body{margin-top:3px!important;color:#dfe3ec!important;font-size:14.5px!important;line-height:1.58!important}
  .empty-channel{
    position:relative!important;z-index:1!important;
    min-height:100%!important;
    max-width:1060px!important;
    justify-content:center!important;
    align-items:flex-start!important;
    padding:40px 18px 90px!important;
  }
  .empty-icon{
    width:72px!important;height:72px!important;margin-bottom:20px!important;
    border-color:rgba(160,126,255,.18)!important;border-radius:22px!important;
    background:linear-gradient(145deg,rgba(139,99,255,.15),rgba(255,255,255,.02))!important;
    box-shadow:0 18px 50px rgba(0,0,0,.18)!important;
  }
  .empty-channel h2{font-size:31px!important;font-weight:850!important;letter-spacing:-.035em!important}
  .empty-channel p{max-width:620px!important;color:#7d8698!important;font-size:13px!important;line-height:1.6!important}

  .typing{position:relative!important;z-index:2!important;max-width:1060px!important;width:calc(100% - 48px)!important}
  .composer-wrap{
    position:relative!important;z-index:2!important;
    padding:0 clamp(24px,3.2vw,52px) 22px!important;
    background:linear-gradient(180deg,transparent,rgba(8,10,16,.95) 36%)!important;
  }
  .composer-wrap>*{max-width:1060px!important}
  .composer{
    min-height:60px!important;
    padding:9px 10px!important;
    border:1px solid rgba(255,255,255,.085)!important;
    border-radius:16px!important;
    background:linear-gradient(180deg,#121621,#0f121b)!important;
    box-shadow:0 18px 55px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.025)!important;
  }
  .composer:focus-within{border-color:rgba(159,124,255,.28)!important;box-shadow:0 20px 62px rgba(0,0,0,.30),0 0 0 1px rgba(139,99,255,.04)!important}
  .composer textarea{font-size:14px!important;line-height:1.5!important}
  .attach-button{background:#171b26!important;border-radius:11px!important}
  .send-button{border-radius:11px!important;background:linear-gradient(135deg,#6748e7,#9669ff)!important;box-shadow:0 10px 25px rgba(117,72,235,.22)!important}

  /* Community / members */
  .members{
    border-left:1px solid var(--bc-shell-line)!important;
    background:linear-gradient(180deg,#090b11 0%,#080a0f 100%)!important;
  }
  .members-header{
    height:var(--bc-shell-topbar)!important;
    padding:0 18px!important;
    border-bottom:1px solid var(--bc-shell-line)!important;
    background:#090b11!important;
  }
  .members-header span{color:#626b7d!important;font-size:8px!important;letter-spacing:.16em!important}
  .members-header strong{margin-top:4px!important;font-size:12.5px!important;font-weight:850!important}
  .member-list{height:calc(100% - var(--bc-shell-topbar))!important;padding:10px 11px 24px!important}
  .member-role{padding:17px 8px 8px!important;color:#70798b!important;font-size:8px!important;letter-spacing:.13em!important}
  .member{min-height:54px!important;margin:2px 0!important;padding:7px 9px!important;border-radius:12px!important}
  .member:hover{border-color:rgba(255,255,255,.035)!important;background:rgba(255,255,255,.028)!important}
  .member-avatar{width:38px!important;height:38px!important;border-radius:12px!important}
  .member-name{font-size:12px!important;font-weight:750!important}
  .member-status{font-size:9px!important;color:#626d80!important}

  /* Voice dock as a proper subsystem card */
  .voice-dock{
    margin:0 11px 10px!important;padding:12px!important;
    border:1px solid rgba(67,231,154,.12)!important;border-radius:14px!important;
    background:linear-gradient(145deg,#0b1516,#0a0e14)!important;
    box-shadow:0 12px 32px rgba(0,0,0,.15)!important;
  }
}

@media (max-width:1440px) and (min-width:761px){
  .app{grid-template-columns:78px 304px minmax(0,1fr)!important}
  .members{display:none!important}
  .mobile-tablet-only{display:grid!important}
}

@media (max-width:980px) and (min-width:761px){
  .app{grid-template-columns:72px 284px minmax(0,1fr)!important}
  .workspace-card{margin-left:10px!important;margin-right:10px!important}
  .messages{padding-left:24px!important;padding-right:24px!important}
  .composer-wrap{padding-left:24px!important;padding-right:24px!important}
  .owner-button,.moderation-button{display:none!important}
}

/* Mobile remains lightweight: no blur-heavy shell, bigger touch targets. */
@media (max-width:760px){
  .workspace-card{min-height:68px!important;margin:10px 10px 5px!important;border-radius:15px!important;background:#0d1018!important}
  .channel-button{min-height:46px!important;border-radius:12px!important;font-size:14px!important}
  .channel-category-row{min-height:38px!important}
  .user-panel{min-height:72px!important}
  .chat-header{border-bottom:1px solid rgba(255,255,255,.06)!important}
  .messages{background:#080a10!important}
  .empty-channel{justify-content:center!important;padding:30px 18px 70px!important}
  .empty-channel h2{font-size:25px!important}.empty-channel p{font-size:12px!important}
  .composer{border-radius:15px!important;background:#11141d!important}
  .mobile-nav{background:#07090e!important;backdrop-filter:none!important}
  .mobile-nav button{min-height:50px!important;border-radius:12px!important}
}


/* ========================================================================
   BRILL CONNECT · PROFESSIONAL COMPOSER MEDIA SYSTEM
   ======================================================================== */
.composer-tools{display:flex!important;align-items:center!important;gap:4px!important;align-self:center!important;color:#7d879c!important}
.composer-tool-button{height:36px;min-width:36px;padding:0 8px;border:1px solid transparent;border-radius:10px;background:transparent;color:#828da3;display:grid;place-items:center;cursor:pointer;transition:background .16s ease,color .16s ease,border-color .16s ease,transform .12s ease;font:800 10px/1 system-ui,-apple-system,"Segoe UI",sans-serif}
.composer-tool-button:hover,.composer-tool-button:focus-visible{outline:none;color:#eeeaff;background:#1a1f2b;border-color:rgba(154,119,255,.18)}
.composer-tool-button:active{transform:scale(.94)}
.emoji-tool-button span{font-size:20px;font-family:"Segoe UI Emoji","Apple Color Emoji",sans-serif;font-weight:400;line-height:1}
.gif-tool-button span{letter-spacing:.03em;font-size:9px}

.bc-media-picker{position:fixed;z-index:10050;width:500px;max-width:calc(100vw - 28px);max-height:min(640px,calc(100dvh - 100px));overflow:hidden;display:flex;flex-direction:column;border:1px solid rgba(255,255,255,.10);border-radius:18px;background:linear-gradient(180deg,#151925 0%,#0d1018 100%);box-shadow:0 28px 90px rgba(0,0,0,.55),0 0 0 1px rgba(119,80,225,.08);color:#f5f3ff;animation:bcMediaIn .16s ease-out}
@keyframes bcMediaIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
.bc-media-head{height:62px;min-height:62px;padding:0 14px 0 17px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.07);background:rgba(9,11,17,.52)}
.bc-media-head>div{display:flex;flex-direction:column;gap:3px}.bc-media-head strong{font-size:15px;font-weight:850;letter-spacing:-.01em}.bc-media-head span{font-size:10px;color:#7f899f}
.bc-media-close{width:34px;height:34px;border-radius:10px;border:1px solid rgba(255,255,255,.07);background:#10141e;color:#7e889b;font-size:20px;cursor:pointer}.bc-media-close:hover{color:#fff;background:#1a1f2b}
.bc-media-body{min-width:0;min-height:0;display:flex;flex-direction:column;padding:12px;overflow:hidden}
.bc-picker-search{display:flex;align-items:center;gap:8px;min-height:40px;border:1px solid rgba(255,255,255,.08);border-radius:11px;background:#090c13;padding:0 8px 0 12px}.bc-picker-search>span{font-size:18px;color:#626d82}.bc-picker-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:#f0f2f7;font-size:12px}.bc-picker-search input::placeholder{color:#5e687d}.bc-picker-search>button{height:29px;padding:0 11px;border-radius:8px;border:1px solid rgba(149,111,255,.20);background:rgba(116,76,235,.13);color:#c8b8ff;font-size:10px;font-weight:750;cursor:pointer}.bc-picker-search>button:hover{background:rgba(116,76,235,.22);color:#fff}.bc-picker-search>button:disabled{opacity:.55;cursor:wait}
.bc-emoji-categories{height:44px;display:grid;grid-template-columns:repeat(7,1fr);gap:3px;align-items:center;border-bottom:1px solid rgba(255,255,255,.06)}.bc-emoji-categories button{height:33px;border:0;border-radius:9px;background:transparent;color:#778297;font-size:17px;cursor:pointer}.bc-emoji-categories button:hover{background:#171b26;color:#eeeaff}.bc-emoji-categories button.active{background:rgba(119,79,232,.16);color:#bfaaff;box-shadow:inset 0 0 0 1px rgba(146,111,255,.14)}
.bc-emoji-grid{margin-top:8px;padding:2px 3px 8px;display:grid;grid-template-columns:repeat(8,1fr);gap:3px;overflow:auto;min-height:250px;max-height:365px;scrollbar-width:thin;scrollbar-color:#3a315d transparent}.bc-emoji-cell{aspect-ratio:1;border:0;border-radius:10px;background:transparent;font:26px/1 "Segoe UI Emoji","Apple Color Emoji",sans-serif;cursor:pointer;display:grid;place-items:center;transition:background .12s ease,transform .12s ease}.bc-emoji-cell:hover{background:#202536;transform:scale(1.12)}

.bc-gif-tabs{display:flex;gap:6px;padding:11px 0 9px;flex:0 0 auto}.bc-gif-tabs button{height:32px;border:1px solid transparent;border-radius:10px;padding:0 13px;background:transparent;color:#7f899d;font-size:10px;font-weight:800;cursor:pointer;transition:.14s ease}.bc-gif-tabs button:hover{background:#171b26;color:#d8dcef}.bc-gif-tabs button.active{background:linear-gradient(180deg,rgba(126,86,241,.22),rgba(108,72,216,.13));border-color:rgba(144,107,255,.16);color:#d7cbff}
.bc-gif-grid{width:100%;min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:row;gap:8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;align-content:start;min-height:278px;max-height:404px;padding:2px 4px 10px 2px;scrollbar-width:thin;scrollbar-color:#3b315f transparent}
.bc-gif-card{position:relative;display:block;width:100%;min-width:0;aspect-ratio:16/9;padding:0;overflow:hidden;border:1px solid rgba(255,255,255,.075);border-radius:13px;background:#080a10;cursor:pointer;isolation:isolate;box-shadow:0 1px 0 rgba(255,255,255,.015);transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease}
.bc-gif-media{position:absolute;inset:0;display:block;overflow:hidden;background:linear-gradient(135deg,#121520,#090b11)}.bc-gif-media img{width:100%;height:100%;display:block;object-fit:cover;transform:translateZ(0);transition:transform .18s ease,filter .18s ease,opacity .18s ease}.bc-gif-card::after{content:"";position:absolute;z-index:1;inset:43% 0 0;background:linear-gradient(180deg,transparent,rgba(4,5,9,.86));pointer-events:none}.bc-gif-label{position:absolute;z-index:2;left:10px;right:38px;bottom:8px;text-align:left;color:#fff;font-size:10px;font-weight:850;letter-spacing:.01em;text-shadow:0 2px 10px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bc-gif-send{position:absolute;z-index:3;right:8px;bottom:7px;width:24px;height:24px;border-radius:8px;display:grid;place-items:center;background:rgba(9,11,17,.72);border:1px solid rgba(255,255,255,.10);color:#cfc3ff;font-size:12px;opacity:0;transform:translateY(2px);transition:.14s ease;backdrop-filter:blur(6px)}
.bc-gif-card:hover{border-color:rgba(153,117,255,.36);box-shadow:0 8px 28px rgba(0,0,0,.24),0 0 0 1px rgba(126,86,240,.05);transform:translateY(-1px)}.bc-gif-card:hover .bc-gif-media img{transform:scale(1.035);filter:brightness(1.06)}.bc-gif-card:hover .bc-gif-send{opacity:1;transform:none}.bc-gif-card:focus-visible{outline:2px solid #8e6cff;outline-offset:2px}.bc-gif-card.media-error .bc-gif-media img{object-fit:cover;opacity:.88}.bc-gif-card.loading{pointer-events:none}.bc-gif-card.loading .bc-gif-media img{filter:brightness(.28)}.bc-gif-card.loading>i{position:absolute;z-index:5;inset:0;margin:auto;width:27px;height:27px;border-radius:50%;border:2px solid rgba(255,255,255,.22);border-top-color:#a88aff;animation:bcGifSpin .7s linear infinite}@keyframes bcGifSpin{to{transform:rotate(360deg)}}

.bc-gif-foot{display:flex;justify-content:space-between;padding:8px 3px 0;color:#5f687a;font-size:9px;letter-spacing:.03em}.bc-picker-empty{grid-column:1/-1;min-height:150px;display:grid;place-items:center;text-align:center;color:#697388;font-size:11px;padding:24px}

/* GIF messages are treated as media, not generic thumbnails. */
.message-attachments a:has(img[src$=".gif"]),.message-attachments a:has(img[src*="/files/"]){border-radius:12px;overflow:hidden}.message-attachments img{max-width:min(520px,100%)!important;max-height:380px!important;border-radius:12px!important;background:#070910!important;object-fit:contain!important}

@media(max-width:760px){
  .composer-tools{display:flex!important;gap:1px!important}.composer-tool-button{height:36px;min-width:32px;padding:0 4px;border-radius:9px}.gif-tool-button span{font-size:8px}.emoji-tool-button span{font-size:18px}
  .bc-media-picker{position:fixed!important;left:8px!important;right:8px!important;bottom:calc(72px + env(safe-area-inset-bottom))!important;width:auto!important;max-height:min(66dvh,560px)!important;border-radius:18px!important}
  .bc-media-head{height:56px;min-height:56px}.bc-media-body{padding:10px}.bc-emoji-grid{grid-template-columns:repeat(7,1fr);min-height:225px;max-height:42dvh}.bc-emoji-cell{font-size:25px}.bc-gif-grid{grid-template-columns:repeat(2,minmax(0,1fr));min-height:230px;max-height:43dvh;gap:7px;padding-right:2px}.bc-gif-card{min-height:0;aspect-ratio:16/10}.bc-gif-send{opacity:1}.bc-gif-foot{display:none}
}
@media(max-width:390px){.bc-emoji-grid{grid-template-columns:repeat(6,1fr)}.bc-gif-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.composer-tool-button{min-width:29px}.composer{gap:2px!important}.send-button,.attach-button{min-width:35px!important;width:35px!important}}

/* BRILL CONNECT · GIF BROWSER PRO 2 */
.bc-media-picker,.bc-media-body,.bc-gif-grid,.bc-gif-card{box-sizing:border-box}
.bc-gif-grid::-webkit-scrollbar{width:7px;height:0}.bc-gif-grid::-webkit-scrollbar-track{background:transparent}.bc-gif-grid::-webkit-scrollbar-thumb{background:#3c3260;border-radius:20px;border:2px solid transparent;background-clip:padding-box}
.bc-gif-card.media-prune{opacity:0;transform:scale(.97);pointer-events:none}
