/* ===== עיצוב בהשראת Google Chat ===== */
:root {
  --bg: #f8fafd; --panel: #ffffff; --panel2: #f0f4f9; --panel3: #dde3ea; --line: #e3e3e3; --text: #1f1f1f; --mut: #444746;
  --acc: #0b57d0; --acc2: #0b57d0; --accg: #0b57d0; --mine: #e9eef6; --hover: rgba(31,31,31,.07); --rail: #f8fafd;
  --shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15); --radius: 16px;
  --sel: #d3e3fd; --sel-text: #041e49; --compose: #c2e7ff; --compose-text: #001d35; --outline: #747775;
  --font: "Google Sans", "Google Sans Text", "Roboto", "Noto Sans Hebrew", "Segoe UI", system-ui, Arial, sans-serif;
}
[data-theme="dark"] {
  --bg: #131314; --panel: #1e1f20; --panel2: #282a2c; --panel3: #444746; --line: #37393b; --text: #e3e3e3; --mut: #c4c7c5;
  --acc: #a8c7fa; --acc2: #a8c7fa; --accg: #a8c7fa; --mine: #2b2d30; --hover: rgba(227,227,227,.08); --rail: #131314;
  --sel: #0842a0; --sel-text: #d3e3fd; --compose: #004a77; --compose-text: #c2e7ff; --outline: #8e918f;
  --shadow: 0 1px 3px rgba(0,0,0,.6), 0 4px 8px 3px rgba(0,0,0,.35);
}
body { font-size: 14px; line-height: 1.45; }
::selection { background: rgba(11,87,208,.25); }
a { color: var(--acc); }

/* כפתורים */
.btn { border-radius: 999px; border: 1px solid var(--outline); background: transparent; color: var(--acc); font-weight: 500; padding: .5rem 1.2rem; }
.btn:hover { background: var(--hover); border-color: var(--outline); transform: none; }
.btn.primary { background: var(--acc); color: #fff; border-color: transparent; box-shadow: none; }
[data-theme="dark"] .btn.primary { color: #062e6f; }
.btn.primary:hover { box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 1px 2px rgba(60,64,67,.15); background: var(--acc); filter: brightness(1.08); }
.btn.danger { background: #b3261e; color: #fff; border-color: transparent; }
.btn.ghost { border-color: transparent; }
.icon-btn { border-radius: 50%; color: var(--mut); } .icon-btn:hover, .icon-btn.on { background: var(--hover); color: var(--text); }
.icon-btn.sm { border-radius: 50%; }
input[type=text], input[type=search], input[type=number], input[type=password], input[type=email], textarea, select { border: 1px solid var(--outline); border-radius: 8px; background: transparent; }
input:focus, textarea:focus, select:focus { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); background: transparent; }
.badge { background: var(--acc); color: #fff; font-weight: 500; } [data-theme="dark"] .badge { color: #062e6f; }
.dot { border-color: var(--panel); } .dot.on { background: #1e8e3e; }

/* פס צד (ניווט) */
#app { grid-template-columns: 76px 288px minmax(0, 1fr); }
#app.with-panel { grid-template-columns: 76px 288px minmax(0, 1fr) 380px; }
.rail { background: var(--rail); padding: .7rem 0 .9rem; gap: .35rem; }
.rail .logo-wrap { filter: none; margin-bottom: .6rem; }
.rail-btn { width: 68px; height: auto; border-radius: 0; flex-direction: column; gap: 4px; padding: 2px 0; color: var(--mut); background: transparent !important; box-shadow: none !important; transform: none !important; }
.rail-btn .ri { width: 56px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.rail-btn .rl { font-size: 12px; font-weight: 500; line-height: 16px; }
.rail-btn:hover .ri { background: var(--hover); }
.rail-btn.on { color: var(--text); } .rail-btn.on .ri { background: var(--sel); color: var(--sel-text); }
.rail-btn .badge { top: 0; inset-inline-start: 8px; }

/* סרגל הערוצים */
.side { background: transparent; border: 0; }
.side-head { padding: 1rem 1.2rem .4rem; }
.side-head h2 { background: none; color: var(--text); -webkit-text-fill-color: currentColor; font-size: 1.375rem; font-weight: 400; letter-spacing: 0; }
.qs-btn { margin: .4rem .9rem .7rem; border: 0; background: var(--panel2) !important; border-radius: 999px; height: 44px; padding: 0 1rem; color: var(--mut); }
.qs-btn:hover { box-shadow: 0 1px 2px rgba(60,64,67,.3); } .qs-btn kbd { background: transparent; border: 0; opacity: .7; }
.side-scroll { padding: 0 .6rem 1rem; }
.sec-title { padding: 1rem .8rem .35rem; font-size: .875rem; font-weight: 500; letter-spacing: 0; color: var(--text); }
.ch-item { border-radius: 999px; padding: .3rem .8rem; color: var(--text); min-height: 36px; font-weight: 400; }
.ch-item:hover { background: var(--hover); }
.ch-item.on { background: var(--sel); color: var(--sel-text); box-shadow: none; font-weight: 500; }
.ch-item.on .ci { background: transparent; } .ch-item .ci { background: transparent; border-radius: 0; width: 24px; height: 24px; }
.ch-item.unread { font-weight: 700; } .ch-item.on .badge { background: var(--acc); color: #fff; }

/* אזור ראשי */
.main { background: var(--panel); margin: 8px 0 8px 8px; border-radius: 16px; overflow: hidden; }
.main-head { background: var(--panel); border-bottom: 1px solid var(--line); min-height: 64px; padding: .5rem 1rem .5rem .8rem; }
.main-head h1 { font-size: 1.125rem; font-weight: 400; }
.main-head .tp { font-size: .8125rem; }
.banner { background: var(--panel2); border-bottom: 1px solid var(--line); font-weight: 500; }
.panel, #app > .panel { margin: 8px 8px 8px 0; border-radius: 16px; overflow: hidden; background: var(--panel); border: 0; }

/* הודעות */
.msgs { padding: .5rem 0 1rem; }
.day-sep { margin: 1rem 1.25rem .4rem; font-weight: 500; font-size: .75rem; }
.day-sep::before, .day-sep::after { background: var(--line); }
.msg { padding: .3rem 1.25rem; grid-template-columns: 40px minmax(0, 1fr); gap: .1rem .75rem; }
.msg:hover { background: var(--hover); }
.m-name { font-weight: 500; font-size: .875rem; } .m-name:hover { text-decoration: none; }
.m-time { font-size: .75rem; }
.m-tag { background: var(--panel2); color: var(--mut); font-weight: 500; font-size: .6875rem; border-radius: 6px; padding: .05rem .45rem; }
.m-tools { border-radius: 8px; box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); padding: .1rem; border-color: transparent; top: -18px; }
.m-tools .icon-btn, .m-tools .qr { border-radius: 6px; }
.thread-sum { border: 0; background: transparent; padding: .2rem .4rem; border-radius: 8px; color: var(--acc); font-weight: 500; } .thread-sum:hover { background: var(--hover); }
.rx { border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: .08rem .5rem; font-weight: 500; } .rx:hover { background: var(--hover); transform: none; border-color: var(--line); }
.rx.me { background: var(--sel); border-color: var(--sel); color: var(--sel-text); }
.rx-add { border: 1px solid var(--line); border-style: solid; border-radius: 8px; }
.msg.mentioned { background: rgba(251,188,4,.12); box-shadow: inset 3px 0 0 #f9ab00; }
.rich blockquote { background: transparent; border-radius: 0; border-inline-start: 3px solid var(--panel3); }
.rich .mention { background: var(--sel); color: var(--sel-text); border-radius: 4px; }
.rich .chlink { background: var(--sel); color: var(--sel-text); border-radius: 4px; }
.att-img, .att-file, .poll { border-radius: 12px; }
.att-file .fi { background: var(--sel); color: var(--sel-text); border-radius: 50%; }

/* כתיבה */
.composer-wrap { background: var(--panel); padding: .3rem 1rem .9rem; }
.composer { background: var(--panel2); border: 1px solid transparent; border-radius: 24px; box-shadow: none; padding: .4rem .7rem .35rem; }
.composer:focus-within { background: var(--panel); border-color: var(--outline); box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 1px 2px rgba(60,64,67,.15); }
.send-btn { width: 40px; height: 40px; border-radius: 50%; background: transparent !important; color: var(--acc); box-shadow: none !important; }
.send-btn:hover { background: var(--hover) !important; } .send-btn[disabled], .send-btn.off { color: #80868b; }
.tool-btn { border-radius: 50%; }
.typing { color: var(--mut); }

/* חלונות ותפריטים */
.modal, .dialog, .card { border-radius: 28px; }
.menu, .popover, .ctx { border-radius: 12px; }
.info-card { border-radius: 28px; }
