@font-face { font-family: "Noto Sans Hebrew"; src: url(fonts/NotoSansHebrew-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans Hebrew"; src: url(fonts/NotoSansHebrew-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Noto Sans Hebrew"; src: url(fonts/NotoSansHebrew-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Noto Sans Hebrew"; src: url(fonts/NotoSansHebrew-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Sans Hebrew"; src: url(fonts/NotoSansHebrew-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --bg: #f3f5fb; --panel: #ffffff; --panel2: #f1f4fb; --panel3: #e8ecf7; --line: #e1e6f2; --text: #161a2e; --mut: #667090; --acc: #6c4cff; --acc2: #19a7ff;
  --accg: linear-gradient(135deg, #7c5cff 0%, #19b4ff 100%); --danger: #e5484d; --ok: #16a34a; --warn: #f59e0b; --mine: #ecefff; --hover: rgba(108,76,255,.07);
  --rail: #14183a; --shadow: 0 10px 30px -12px rgba(30,30,90,.28); --radius: 14px; --font: "Noto Sans Hebrew", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --code-bg: #f1f3fa; --code-text: #232a4a; color-scheme: light;
}
[data-theme="dark"] {
  --bg: #090c18; --panel: #111528; --panel2: #171c35; --panel3: #1e2442; --line: #262d52; --text: #eaedfb; --mut: #8f99bd; --acc: #8d74ff; --acc2: #3dc2ff; --mine: #1b2152; --hover: rgba(141,116,255,.12);
  --rail: #0a0d1f; --shadow: 0 16px 40px -14px rgba(0,0,0,.7); --code-bg: #0d1126; --code-text: #d8defa; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--acc); }
::selection { background: rgba(124,92,255,.3); }
* { scrollbar-width: thin; scrollbar-color: var(--panel3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--panel3); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
.hidden { display: none !important; }
.grow { flex: 1; }
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ic { display: block; }
.mut { color: var(--mut); }
.ltr { direction: ltr; unicode-bidi: embed; }

/* ---------- כפתורים וקלטים ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: .55rem 1.05rem; font-weight: 600; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s; text-decoration: none; color: var(--text); }
.btn:hover { border-color: var(--acc); transform: translateY(-1px); }
.btn.primary { background: var(--accg); color: #fff; border-color: transparent; box-shadow: 0 8px 22px -8px rgba(108,76,255,.7); }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { padding: .3rem .7rem; font-size: .85rem; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--mut); transition: background .15s, color .15s; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--acc); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.on { background: var(--hover); color: var(--acc); }
input[type=text], input[type=search], input[type=number], input[type=password], input[type=email], textarea, select { width: 100%; padding: .6rem .8rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel2); outline: 0; transition: border-color .15s, box-shadow .15s, background .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(124,92,255,.18); background: var(--panel); }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; } .field > span { font-weight: 600; font-size: .88rem; }
.check { display: flex; align-items: center; gap: .6rem; margin: .4rem 0; cursor: pointer; } .check input { width: 18px; height: 18px; accent-color: var(--acc); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

/* ---------- אווטאר ---------- */
.avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; overflow: hidden; user-select: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av-wrap { position: relative; display: inline-flex; flex: none; }
.dot { position: absolute; inset-inline-start: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #9aa3c0; border: 2px solid var(--panel); }
.dot.on { background: #22c55e; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accg); color: #fff; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.badge.mention { background: var(--danger); } .badge.dim { background: var(--panel3); color: var(--mut); }

/* ---------- פריסה ראשית ---------- */
#app { display: grid; grid-template-columns: 72px 296px minmax(0, 1fr); height: 100dvh; }
#app.with-panel { grid-template-columns: 72px 296px minmax(0, 1fr) 380px; }
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: .8rem 0; gap: .4rem; z-index: 5; }
.rail .logo-wrap { margin-bottom: .8rem; filter: drop-shadow(0 6px 14px rgba(108,76,255,.55)); }
.rail-btn { width: 48px; height: 48px; border-radius: 16px; border: 0; background: transparent; color: #aab2da; display: flex; align-items: center; justify-content: center; position: relative; transition: background .15s, color .15s, transform .15s; }
.rail-btn:hover { background: rgba(255,255,255,.08); color: #fff; transform: scale(1.05); }
.rail-btn.on { background: var(--accg); color: #fff; box-shadow: 0 8px 20px -6px rgba(108,76,255,.8); }
.rail-btn .badge { position: absolute; top: 2px; inset-inline-start: 2px; }
.rail .sp { flex: 1; }
.side { background: var(--panel); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.side-head { padding: 1rem 1rem .6rem; display: flex; flex-direction: column; gap: .15rem; }
.side-head h2 { margin: 0; font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; background: var(--accg); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side-head small { color: var(--mut); }
.qs-btn { margin: .3rem 1rem .6rem; display: flex; align-items: center; gap: .6rem; background: var(--panel2); border: 1.5px solid var(--line); border-radius: 12px; padding: .5rem .8rem; color: var(--mut); text-align: start; }
.qs-btn:hover { border-color: var(--acc); } .qs-btn kbd { margin-inline-start: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0 .4rem; font-size: .72rem; }
.side-scroll { flex: 1; overflow-y: auto; padding: 0 .5rem 1rem; }
.sec-title { display: flex; align-items: center; padding: .9rem .6rem .3rem; color: var(--mut); font-size: .76rem; font-weight: 700; letter-spacing: .04em; }
.sec-title .grow { flex: 1; }
.ch-item { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; background: transparent; padding: .45rem .6rem; border-radius: 12px; text-align: start; color: var(--mut); transition: background .12s; }
.ch-item:hover { background: var(--hover); color: var(--text); }
.ch-item.on { background: var(--accg); color: #fff; box-shadow: 0 6px 18px -8px rgba(108,76,255,.8); }
.ch-item.unread { color: var(--text); font-weight: 700; } .ch-item.on .badge { background: rgba(255,255,255,.28); }
.ch-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-item .ci { width: 28px; height: 28px; border-radius: 9px; background: var(--panel2); display: flex; align-items: center; justify-content: center; flex: none; }
.ch-item.on .ci { background: rgba(255,255,255,.2); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); position: relative; }
.main-head { display: flex; align-items: center; gap: .7rem; padding: .7rem 1.1rem; background: var(--panel); border-bottom: 1px solid var(--line); min-height: 64px; }
.main-head .ttl { flex: 1; min-width: 0; } .main-head h1 { margin: 0; font-size: 1.12rem; font-weight: 800; display: flex; align-items: center; gap: .45rem; }
.main-head .tp { color: var(--mut); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-actions { display: flex; gap: .15rem; }
.banner { display: flex; align-items: center; gap: .7rem; padding: .55rem 1.1rem; font-weight: 600; background: linear-gradient(90deg, rgba(25,167,255,.16), rgba(124,92,255,.16)); border-bottom: 1px solid var(--line); }
.banner.warning { background: rgba(245,158,11,.16); } .banner.danger { background: rgba(229,72,77,.16); } .banner.success { background: rgba(22,163,74,.16); }
.banner .grow { flex: 1; }
.retention-note { text-align: center; color: var(--mut); font-size: .8rem; padding: .5rem; }

/* ---------- רשימת הודעות ---------- */
.msgs { flex: 1; overflow-y: auto; padding: .6rem 0 1rem; position: relative; scroll-behavior: auto; }
.day-sep { display: flex; align-items: center; gap: .8rem; margin: 1.1rem 1.4rem .5rem; color: var(--mut); font-size: .8rem; font-weight: 700; }
.day-sep::before, .day-sep::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.new-sep { display: flex; align-items: center; gap: .6rem; margin: .8rem 1.4rem; color: var(--danger); font-weight: 700; font-size: .8rem; } .new-sep::before, .new-sep::after { content: ""; flex: 1; height: 1px; background: var(--danger); opacity: .5; }
.msg { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .15rem .8rem; padding: .35rem 1.4rem; transition: background .12s; }
.msg:hover { background: var(--hover); }
.msg.compact { padding-top: 0; padding-bottom: .05rem; } .msg.compact .m-av { visibility: hidden; height: 0; } .msg.compact .m-head { display: none; }
.msg.mine .m-body { }
.msg.mentioned { background: rgba(245,158,11,.09); box-shadow: inset 3px 0 0 var(--warn); }
.msg.imp { background: rgba(229,72,77,.07); box-shadow: inset 3px 0 0 var(--danger); }
.msg.pinned .m-head .pin-mark { display: inline-flex; }
.msg.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: rgba(124,92,255,.28); } 100% { background: transparent; } }
.m-av { grid-row: 1 / span 20; padding-top: 2px; cursor: pointer; }
.m-head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.m-name { font-weight: 700; cursor: pointer; } .m-name:hover { text-decoration: underline; }
.m-time { color: var(--mut); font-size: .76rem; }
.m-tag { font-size: .68rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; background: var(--accg); color: #fff; display: inline-flex; align-items: center; gap: .25rem; }
.pin-mark { display: none; color: var(--warn); align-items: center; }
.m-body { min-width: 0; overflow-wrap: anywhere; }
.m-edited { color: var(--mut); font-size: .72rem; margin-inline-start: .4rem; }
.m-del { color: var(--mut); font-style: italic; display: flex; align-items: center; gap: .4rem; }
.msg.sys { display: block; text-align: center; color: var(--mut); font-size: .82rem; padding: .3rem 1rem; } .msg.sys:hover { background: transparent; } .msg.sys span { background: var(--panel2); padding: .2rem .8rem; border-radius: 999px; }
.m-tools { position: absolute; top: -16px; inset-inline-end: 1.2rem; display: none; gap: .1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .15rem; box-shadow: var(--shadow); z-index: 3; }
.msg:hover .m-tools, .msg.tools-open .m-tools { display: flex; }
.m-tools .icon-btn { width: 32px; height: 32px; } .m-tools .qr { width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; } .m-tools .qr:hover { background: var(--hover); }
.thread-sum { display: inline-flex; align-items: center; gap: .5rem; margin-top: .3rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--acc); font-weight: 600; font-size: .82rem; }
.thread-sum:hover { border-color: var(--acc); background: var(--hover); }
.rx-row { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.rx { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem .12rem .45rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--panel); font-size: .8rem; font-weight: 700; transition: transform .12s, border-color .15s; }
.rx:hover { border-color: var(--acc); transform: translateY(-1px); } .rx.me { border-color: var(--acc); background: var(--hover); color: var(--acc); }
.rx img { width: 20px; height: 20px; }
.rx-add { width: 30px; height: 26px; border-radius: 999px; border: 1.5px dashed var(--line); background: transparent; color: var(--mut); display: inline-flex; align-items: center; justify-content: center; } .rx-add:hover { color: var(--acc); border-color: var(--acc); }
.jump { position: absolute; bottom: 14px; inset-inline-start: 50%; transform: translateX(50%); z-index: 4; }
.jump .btn { box-shadow: var(--shadow); } [dir="rtl"] .jump { transform: translateX(50%); }
.typing { height: 22px; padding: 0 1.4rem; color: var(--mut); font-size: .8rem; display: flex; align-items: center; gap: .4rem; }
.typing .dots i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--mut); margin: 0 1px; animation: bounce 1.1s infinite; } .typing .dots i:nth-child(2) { animation-delay: .15s; } .typing .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- תוכן עשיר ---------- */
.rich p { margin: 0 0 .35rem; } .rich p:last-child { margin-bottom: 0; }
.rich h1 { font-size: 1.5rem; margin: .5rem 0 .3rem; line-height: 1.25; } .rich h2 { font-size: 1.25rem; margin: .45rem 0 .25rem; } .rich h3 { font-size: 1.07rem; margin: .4rem 0 .2rem; }
.rich blockquote { margin: .4rem 0; padding: .3rem .9rem; border-inline-start: 4px solid var(--acc); background: var(--panel2); border-radius: 4px 10px 10px 4px; color: var(--mut); }
.rich ul, .rich ol { margin: .3rem 0; padding-inline-start: 1.5rem; }
.rich ul.checklist { list-style: none; padding-inline-start: .2rem; } .rich ul.checklist li { display: flex; align-items: flex-start; gap: .5rem; } .rich ul.checklist li::before { content: ""; width: 17px; height: 17px; margin-top: .22rem; border: 2px solid var(--acc); border-radius: 5px; flex: none; }
.rich ul.checklist li[data-checked="1"]::before { background: var(--accg) ; border-color: transparent; box-shadow: inset 0 0 0 3px var(--panel); } .rich ul.checklist li[data-checked="1"] { color: var(--mut); text-decoration: line-through; }
.rich code { direction: ltr; unicode-bidi: embed; background: var(--code-bg); color: var(--code-text); padding: .1rem .4rem; border-radius: 6px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .88em; }
.rich pre { direction: ltr; text-align: left; position: relative; margin: .45rem 0; padding: 1.9rem 1rem .8rem; background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.rich pre code { background: transparent; padding: 0; font-size: .86rem; line-height: 1.55; display: block; white-space: pre; color: var(--code-text); }
.rich pre .pre-bar { position: absolute; top: 0; left: 0; right: 0; height: 28px; display: flex; align-items: center; justify-content: space-between; padding: 0 .6rem; font-size: .72rem; color: var(--mut); border-bottom: 1px solid var(--line); font-family: var(--font); }
.rich pre .pre-bar button { border: 0; background: transparent; color: var(--mut); display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .4rem; border-radius: 6px; font-size: .72rem; } .rich pre .pre-bar button:hover { background: var(--hover); color: var(--acc); }
.tok-k { color: #c678dd; font-weight: 600; } .tok-s { color: #43a047; } .tok-c { color: #8a93b2; font-style: italic; } .tok-n { color: #ef6c00; } .tok-f { color: #1e88e5; }
[data-theme="dark"] .tok-k { color: #d0a0ff; } [data-theme="dark"] .tok-s { color: #8bd48e; } [data-theme="dark"] .tok-f { color: #6cb6ff; }
.rich .callout { margin: .5rem 0; padding: .6rem .9rem; border-radius: 12px; border: 1px solid; border-inline-start-width: 5px; } .rich .callout p { margin: 0 0 .2rem; }
.callout-info { background: rgba(25,167,255,.1); border-color: #19a7ff; } .callout-tip { background: rgba(22,199,154,.1); border-color: #16c79a; } .callout-success { background: rgba(22,163,74,.1); border-color: #16a34a; } .callout-warning { background: rgba(245,158,11,.12); border-color: #f59e0b; } .callout-danger { background: rgba(229,72,77,.1); border-color: #e5484d; }
.rich table { border-collapse: collapse; margin: .5rem 0; max-width: 100%; display: block; overflow-x: auto; } .rich th, .rich td { border: 1px solid var(--line); padding: .35rem .7rem; min-width: 70px; } .rich th { background: var(--panel2); font-weight: 700; }
.rich hr { border: 0; height: 2px; background: var(--line); margin: .7rem 0; }
.rich a { color: var(--acc); text-decoration: underline; text-underline-offset: 2px; }
.rich img.em { width: 1.45em; height: 1.45em; vertical-align: -0.32em; margin: 0 .05em; display: inline-block; }
.rich.only-emoji img.em { width: 2.6rem; height: 2.6rem; }
.rich .mention { background: rgba(124,92,255,.16); color: var(--acc); padding: .02rem .4rem; border-radius: 7px; font-weight: 600; cursor: pointer; white-space: nowrap; } .rich .mention.me { background: rgba(245,158,11,.25); color: #b45309; } [data-theme="dark"] .rich .mention.me { color: #ffcf6b; }
.rich .mention.mention-all { background: rgba(229,72,77,.15); color: var(--danger); } .rich .chlink { background: rgba(25,167,255,.15); color: var(--acc2); padding: .02rem .4rem; border-radius: 7px; font-weight: 600; cursor: pointer; }
.rich .spoiler { background: var(--text); color: transparent; border-radius: 5px; padding: 0 .25rem; cursor: pointer; user-select: none; transition: background .2s; } .rich .spoiler.revealed { background: var(--panel3); color: inherit; user-select: auto; }

/* ---------- קבצים, סקר ---------- */
.att { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.att-img { position: relative; border-radius: 14px; overflow: hidden; background: var(--panel2); cursor: zoom-in; max-width: min(420px, 100%); border: 1px solid var(--line); }
.att-img img { display: block; max-width: 100%; max-height: 360px; object-fit: cover; transition: transform .3s; } .att-img:hover img { transform: scale(1.02); }
.att-video, .att-audio { margin-top: .2rem; border-radius: 14px; max-width: min(460px, 100%); } .att-video video { width: 100%; max-height: 360px; border-radius: 14px; background: #000; display: block; } .att-audio audio { width: min(360px, 100%); }
.att-file { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; min-width: 240px; max-width: 360px; text-decoration: none; color: inherit; } .att-file:hover { border-color: var(--acc); }
.att-file .fi { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accg); color: #fff; flex: none; }
.att-file .fm { min-width: 0; flex: 1; } .att-file b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .att-file small { color: var(--mut); }
.poll { margin-top: .4rem; border: 1px solid var(--line); background: var(--panel); border-radius: 16px; padding: .8rem 1rem; max-width: 460px; }
.poll h4 { margin: 0 0 .5rem; display: flex; align-items: center; gap: .5rem; }
.poll-opt-row { position: relative; display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .8rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel2); margin-bottom: .4rem; text-align: start; overflow: hidden; }
.poll-opt-row .bar { position: absolute; inset: 0; width: 0; background: rgba(124,92,255,.18); transition: width .4s; } .poll-opt-row > * { position: relative; }
.poll-opt-row.mine { border-color: var(--acc); } .poll-opt-row .ct { margin-inline-start: auto; font-weight: 700; color: var(--acc); }
.poll small { color: var(--mut); }

/* ---------- כתיבת הודעה ---------- */
.composer-wrap { padding: .4rem 1.1rem 1rem; background: var(--bg); position: relative; }
.composer { position: relative; background: var(--panel); border: 1.5px solid var(--line); border-radius: 18px; padding: .5rem .6rem .4rem; box-shadow: 0 8px 26px -18px rgba(30,30,90,.5); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(124,92,255,.14); }
.composer.drag { border-color: var(--acc2); background: rgba(25,167,255,.08); } .composer.disabled { opacity: .6; }
.toolbar { display: none; flex-wrap: wrap; align-items: center; gap: .1rem; padding: .2rem .1rem .45rem; border-bottom: 1px solid var(--line); margin-bottom: .35rem; }
.composer.show-tools .toolbar { display: flex; }
.tool-btn { width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--mut); display: inline-flex; align-items: center; justify-content: center; } .tool-btn:hover { background: var(--hover); color: var(--acc); }
.tsep { width: 1px; height: 20px; background: var(--line); margin: 0 .25rem; }
.editor { min-height: 44px; max-height: 38vh; overflow-y: auto; padding: .45rem .5rem; outline: 0; overflow-wrap: anywhere; }
.editor:empty::before, .editor.empty::before { content: attr(data-placeholder); color: var(--mut); pointer-events: none; }
.editor[contenteditable=true]:empty::before { content: attr(data-placeholder); color: var(--mut); }
.editor p { margin: 0 0 .3rem; } .editor h1 { font-size: 1.5rem; margin: .3rem 0; } .editor h2 { font-size: 1.25rem; margin: .3rem 0; } .editor h3 { font-size: 1.07rem; margin: .3rem 0; }
.editor blockquote { margin: .3rem 0; padding: .3rem .9rem; border-inline-start: 4px solid var(--acc); background: var(--panel2); border-radius: 4px 10px 10px 4px; } .editor ul, .editor ol { margin: .3rem 0; padding-inline-start: 1.5rem; }
.editor ul.checklist { list-style: none; padding-inline-start: .2rem; } .editor ul.checklist li { display: flex; gap: .5rem; } .editor ul.checklist li::before { content: ""; width: 17px; height: 17px; margin-top: .22rem; border: 2px solid var(--acc); border-radius: 5px; flex: none; }
.editor ul.checklist li[data-checked="1"]::before { background: var(--accg); border-color: transparent; box-shadow: inset 0 0 0 3px var(--panel); }
.editor code { direction: ltr; background: var(--code-bg); padding: .1rem .4rem; border-radius: 6px; font-family: ui-monospace, Consolas, monospace; font-size: .88em; } .editor pre { direction: ltr; text-align: left; background: var(--code-bg); border: 1px solid var(--line); padding: .7rem 1rem; border-radius: 12px; margin: .4rem 0; white-space: pre-wrap; } .editor pre code { background: transparent; padding: 0; }
.editor .callout { margin: .4rem 0; padding: .5rem .8rem; border-radius: 12px; border: 1px solid; border-inline-start-width: 5px; } .editor table { border-collapse: collapse; margin: .4rem 0; } .editor th, .editor td { border: 1px dashed var(--line); padding: .3rem .6rem; min-width: 64px; } .editor th { background: var(--panel2); }
.editor img.em { width: 1.45em; height: 1.45em; vertical-align: -0.32em; } .editor .mention { background: rgba(124,92,255,.16); color: var(--acc); padding: .02rem .4rem; border-radius: 7px; font-weight: 600; } .editor .mention-all { background: rgba(229,72,77,.15); color: var(--danger); } .editor .chlink { background: rgba(25,167,255,.15); color: var(--acc2); padding: .02rem .4rem; border-radius: 7px; } .editor .spoiler { background: var(--panel3); border-radius: 5px; padding: 0 .25rem; } .editor a { color: var(--acc); text-decoration: underline; }
.cbar { display: flex; align-items: center; gap: .1rem; padding-top: .15rem; }
.chint { color: var(--warn); font-size: .8rem; font-weight: 600; margin-inline-end: .5rem; }
.send-btn { width: 42px; height: 42px; border: 0; border-radius: 14px; background: var(--accg); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px -8px rgba(108,76,255,.8); transition: transform .12s, opacity .15s; } .send-btn:hover { transform: translateY(-2px) scale(1.04); } .send-btn[disabled] { opacity: .35; transform: none; box-shadow: none; cursor: default; }
.send-btn svg { transform: scaleX(-1); }
.tray { display: flex; flex-wrap: wrap; gap: .4rem; } .tray:not(:empty) { padding: .2rem 0 .5rem; }
.file-chip, .poll-chip { position: relative; display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); max-width: 260px; overflow: hidden; }
.file-chip img { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; } .fc-meta { min-width: 0; display: flex; flex-direction: column; } .fc-meta b { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; } .fc-meta small { color: var(--mut); font-size: .72rem; }
.file-chip.error { border-color: var(--danger); } .fc-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--panel3); } .fc-bar i { display: block; height: 100%; background: var(--accg); }
.ac-box { position: absolute; bottom: calc(100% + 6px); inset-inline-start: .6rem; min-width: 260px; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .3rem; z-index: 20; }
.ac-item { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; background: transparent; padding: .35rem .5rem; border-radius: 10px; text-align: start; } .ac-item.on, .ac-item:hover { background: var(--hover); } .ac-item small { color: var(--mut); margin-inline-start: auto; direction: ltr; }
.ac-ico { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--panel2); }

/* ---------- פאנל צד ---------- */
.panel { background: var(--panel); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.panel-head { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); min-height: 64px; } .panel-head h3 { margin: 0; flex: 1; font-size: 1.05rem; }
.panel-body { flex: 1; overflow-y: auto; min-height: 0; }
.panel .msg { padding-inline: 1rem; grid-template-columns: 36px minmax(0, 1fr); }
.thread-wrap { display: flex; flex-direction: column; height: 100%; } .thread-wrap .panel-body { padding-bottom: .5rem; } .thread-wrap .composer-wrap { background: var(--panel); padding: .4rem .8rem .8rem; }
.thread-root { border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin-bottom: .3rem; }
.mem-sec { padding: .8rem 1rem .3rem; font-size: .76rem; font-weight: 700; color: var(--mut); }
.mem { display: flex; align-items: center; gap: .7rem; padding: .4rem 1rem; cursor: pointer; width: 100%; border: 0; background: transparent; text-align: start; } .mem:hover { background: var(--hover); }
.mem .mi { min-width: 0; flex: 1; } .mem b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mem small { color: var(--mut); }
.search-box { padding: .7rem 1rem; display: flex; gap: .5rem; } .res { padding: .6rem 1rem; border-bottom: 1px solid var(--line); cursor: pointer; } .res:hover { background: var(--hover); } .res .rh { display: flex; gap: .5rem; font-size: .8rem; color: var(--mut); margin-bottom: .2rem; } .res mark { background: rgba(245,158,11,.35); color: inherit; border-radius: 4px; }
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: .8rem 1rem; } .fgrid .fcell { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--panel2); display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); cursor: pointer; position: relative; } .fgrid img { width: 100%; height: 100%; object-fit: cover; } .flist { padding: 0 1rem .8rem; display: flex; flex-direction: column; gap: .4rem; }
.empty-state { text-align: center; color: var(--mut); padding: 3rem 1.5rem; } .empty-state .big { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 24px; background: var(--accg); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 14px 30px -12px rgba(108,76,255,.7); }
.tabs { display: flex; gap: .2rem; padding: .4rem .8rem; border-bottom: 1px solid var(--line); overflow-x: auto; } .tab { border: 0; background: transparent; padding: .4rem .9rem; border-radius: 10px; color: var(--mut); font-weight: 600; white-space: nowrap; } .tab.on { background: var(--hover); color: var(--acc); }

/* ---------- אימוג'י ---------- */
.ep { width: 372px; max-width: 92vw; display: flex; flex-direction: column; } .ep-search { margin-bottom: .4rem; } .ep-tabs { display: flex; gap: .1rem; border-bottom: 1px solid var(--line); padding-bottom: .3rem; } .ep-tab { border: 0; background: transparent; width: 34px; height: 30px; border-radius: 8px; color: var(--mut); display: flex; align-items: center; justify-content: center; } .ep-tab:hover { background: var(--hover); color: var(--acc); }
.ep-grid { height: 300px; overflow-y: auto; padding-top: .3rem; } .ep-sec-title { font-size: .72rem; font-weight: 700; color: var(--mut); padding: .3rem .2rem; position: sticky; top: 0; background: var(--panel); z-index: 1; } .ep-cells { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; }
.ep-cell { border: 0; background: transparent; border-radius: 10px; padding: 3px; display: flex; align-items: center; justify-content: center; transition: transform .1s, background .1s; } .ep-cell:hover { background: var(--hover); transform: scale(1.18); } .ep-preview { padding: .4rem .2rem 0; color: var(--mut); font-size: .8rem; min-height: 26px; border-top: 1px solid var(--line); margin-top: .3rem; }
.em-missing { color: var(--mut); }

/* ---------- פופאובר, דיאלוג, טוסט ---------- */
.popover { position: fixed; z-index: 1000; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: .5rem; opacity: 0; transform: translateY(6px) scale(.98); transition: opacity .12s, transform .12s; max-width: 94vw; } .popover.in { opacity: 1; transform: none; }
.menu { min-width: 200px; display: flex; flex-direction: column; } .menu-pop { padding: .3rem; } .menu-item { display: flex; align-items: center; gap: .6rem; border: 0; background: transparent; padding: .5rem .7rem; border-radius: 10px; text-align: start; width: 100%; } .menu-item:hover { background: var(--hover); } .menu-item.danger { color: var(--danger); } .menu-item small { margin-inline-start: auto; color: var(--mut); } .menu-sep { height: 1px; background: var(--line); margin: .25rem .3rem; }
.color-grid { display: grid; grid-template-columns: repeat(6, 28px); gap: 6px; padding: .3rem; } .swatch { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); } .swatch:hover { transform: scale(1.15); }
.modal-back { position: fixed; inset: 0; z-index: 900; background: rgba(8,10,24,.55); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; transition: opacity .18s; } .modal-back.in { opacity: 1; }
.modal { width: min(460px, 100%); max-height: 92vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); transform: translateY(14px) scale(.98); transition: transform .2s; } .modal-back.in .modal { transform: none; } .modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; padding: 1rem 1.2rem .4rem; } .modal-head h3 { margin: 0; flex: 1; font-size: 1.15rem; } .modal-body { padding: .6rem 1.2rem; overflow-y: auto; } .modal-text { margin: .3rem 0; } .modal-actions { display: flex; justify-content: flex-start; gap: .5rem; padding: .8rem 1.2rem 1.1rem; flex-direction: row-reverse; }
.toasts { position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 1200; display: flex; flex-direction: column; gap: .5rem; } .toast { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 240px; max-width: 420px; transform: translateY(14px); opacity: 0; transition: .25s; font-weight: 600; } .toast.in { transform: none; opacity: 1; }
.toast.error { border-color: var(--danger); } .toast.error .ico { color: var(--danger); } .toast.success .ico { color: var(--ok); } .toast.warning .ico { color: var(--warn); } .toast.info .ico { color: var(--acc); }
.lightbox { position: fixed; inset: 0; z-index: 1100; background: rgba(5,6,16,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; animation: fade .2s; } .lightbox img, .lightbox video { max-width: 92vw; max-height: 82vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); } .lightbox .lb-bar { display: flex; gap: .6rem; margin-top: 1rem; color: #fff; align-items: center; } .lightbox .lb-x { position: absolute; top: 14px; inset-inline-end: 18px; color: #fff; }
.lightbox .lb-nav { position: absolute; top: 50%; color: #fff; } .lightbox .lb-prev { inset-inline-start: 14px; } .lightbox .lb-next { inset-inline-end: 14px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.profile-card { width: 300px; } .pc-top { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .6rem .5rem; text-align: center; } .pc-top h4 { margin: .3rem 0 0; font-size: 1.1rem; } .pc-stats { display: flex; justify-content: space-around; border-block: 1px solid var(--line); padding: .5rem 0; margin: .5rem 0; font-size: .8rem; text-align: center; } .pc-stats b { display: block; font-size: 1.05rem; } .pc-actions { display: flex; flex-direction: column; gap: .3rem; }

/* ---------- ניהול ---------- */
.admin { position: fixed; inset: 0; z-index: 800; background: var(--bg); display: grid; grid-template-columns: 240px 1fr; animation: fade .2s; }
.ad-nav { background: var(--rail); color: #c5cbe8; display: flex; flex-direction: column; padding: 1rem .7rem; gap: .2rem; } .ad-nav h2 { color: #fff; margin: .2rem .6rem 1rem; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.ad-tab { display: flex; align-items: center; gap: .7rem; border: 0; background: transparent; color: inherit; padding: .65rem .8rem; border-radius: 12px; text-align: start; font-weight: 600; } .ad-tab:hover { background: rgba(255,255,255,.08); } .ad-tab.on { background: var(--accg); color: #fff; } .ad-tab .badge { margin-inline-start: auto; }
.ad-main { overflow-y: auto; padding: 1.4rem 1.8rem 3rem; } .ad-main h2 { margin: 0 0 1rem; font-size: 1.4rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; } .stat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1rem; position: relative; overflow: hidden; } .stat::after { content: ""; position: absolute; inset-inline-end: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%; background: var(--accg); opacity: .12; } .stat small { color: var(--mut); font-weight: 600; } .stat b { display: block; font-size: 1.8rem; line-height: 1.2; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.2rem; margin-bottom: 1rem; } .card h3 { margin: 0 0 .8rem; font-size: 1.05rem; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; } .chart .bar { flex: 1; background: var(--accg); border-radius: 8px 8px 3px 3px; min-height: 3px; position: relative; opacity: .9; } .chart .bar span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--mut); } .chart-lbl { display: flex; gap: 6px; font-size: .68rem; color: var(--mut); } .chart-lbl span { flex: 1; text-align: center; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; } .tbl th { text-align: start; color: var(--mut); font-size: .78rem; padding: .5rem .6rem; border-bottom: 1px solid var(--line); } .tbl td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; } .tbl tr:hover td { background: var(--hover); }
.pill { display: inline-flex; align-items: center; gap: .25rem; padding: .08rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--panel2); color: var(--mut); } .pill.ok { background: rgba(22,163,74,.15); color: var(--ok); } .pill.bad { background: rgba(229,72,77,.15); color: var(--danger); } .pill.warn { background: rgba(245,158,11,.18); color: #b45309; } .pill.acc { background: var(--hover); color: var(--acc); }
.note { display: flex; gap: .7rem; padding: .8rem 1rem; border-radius: 14px; background: rgba(25,167,255,.1); border: 1px solid rgba(25,167,255,.35); margin-bottom: 1rem; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; } .switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); } .switch input { width: 42px; height: 24px; accent-color: var(--acc); }

/* ---------- דף נחיתה והודעות מערכת ---------- */
.landing { position: fixed; inset: 0; overflow-y: auto; background: #070a18; color: #fff; }
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: 0; } .aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 18s ease-in-out infinite; } .aurora i:nth-child(1) { width: 560px; height: 560px; background: #6c4cff; top: -160px; inset-inline-start: -120px; } .aurora i:nth-child(2) { width: 480px; height: 480px; background: #19b4ff; bottom: -160px; inset-inline-end: -100px; animation-delay: -6s; } .aurora i:nth-child(3) { width: 380px; height: 380px; background: #ff4fa3; top: 35%; inset-inline-end: 30%; opacity: .3; animation-delay: -11s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, -40px) scale(1.15); } }
.grid-bg { position: fixed; inset: 0; z-index: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 75%); }
.land-in { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; text-align: center; }
.land-in .lg { display: inline-flex; filter: drop-shadow(0 12px 30px rgba(108,76,255,.8)); animation: float 4s ease-in-out infinite; } @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.land-in h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); margin: .6rem 0 .3rem; font-weight: 800; letter-spacing: -.02em; background: linear-gradient(90deg, #fff, #b9a9ff 45%, #6fd6ff); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.land-in .tag { font-size: 1.3rem; color: #c9d0f5; margin-bottom: .6rem; } .land-in .desc { max-width: 640px; margin: 0 auto 1.8rem; color: #aab3de; line-height: 1.8; }
.g-btn { display: inline-flex; align-items: center; gap: .8rem; background: #fff; color: #1f2340; border: 0; border-radius: 16px; padding: .85rem 1.8rem; font-weight: 800; font-size: 1.1rem; box-shadow: 0 20px 50px -14px rgba(108,76,255,.9); transition: transform .15s; text-decoration: none; } .g-btn:hover { transform: translateY(-3px) scale(1.02); }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 3.2rem; text-align: start; } .feat > div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); border-radius: 20px; padding: 1.2rem; } .feat .fi { width: 44px; height: 44px; border-radius: 14px; background: var(--accg); display: flex; align-items: center; justify-content: center; margin-bottom: .7rem; } .feat h3 { margin: 0 0 .3rem; font-size: 1.05rem; } .feat p { margin: 0; color: #aab3de; font-size: .9rem; line-height: 1.7; }
.info-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; overflow: auto; background: radial-gradient(circle at 30% 20%, #2a2170, #090c18 60%); } .info-card { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 2rem 2.4rem; max-width: 460px; text-align: center; box-shadow: var(--shadow); } .info-card h1 { margin: 0 0 .5rem; font-size: 1.5rem; } .info-actions { display: flex; gap: .6rem; justify-content: center; margin-top: 1.2rem; }
.blocked-card { max-width: 520px; margin: 18vh auto; }
.loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); z-index: 50; } .spin { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--panel3); border-top-color: var(--acc); animation: sp 1s linear infinite; } @keyframes sp { to { transform: rotate(360deg); } }

/* ---------- מובייל ---------- */
.m-only { display: none; }
@media (max-width: 1100px) { #app.with-panel { grid-template-columns: 72px 270px minmax(0, 1fr); } #app.with-panel .panel { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 100vw); z-index: 60; box-shadow: var(--shadow); } }
@media (max-width: 820px) {
  #app, #app.with-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 62px; }
  .rail { flex-direction: row; justify-content: space-around; padding: 0 .4rem; order: 3; } .rail .logo-wrap, .rail .sp { display: none; } .rail-btn { width: 44px; height: 44px; }
  .side { position: fixed; inset: 0 0 62px 0; z-index: 40; transform: translateX(100%); transition: transform .25s; } .side.open { transform: none; }
  .m-only { display: inline-flex; } .msg { padding-inline: .8rem; } .composer-wrap { padding-inline: .5rem; } .admin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .ad-nav { flex-direction: row; overflow-x: auto; padding: .5rem; } .ad-nav h2 { display: none; } .ad-main { padding: 1rem; } .set-grid { grid-template-columns: 1fr; }
  .m-tools { inset-inline-end: .5rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
