/* OfisHat — arayüz */
:root {
  --accent: #5b5bf7;
  --accent-2: #7c6cf9;
  --accent-soft: #ececfe;
  --accent-text: #4040d8;
  --bg: #f6f6f9;
  --panel: #ffffff;
  --panel-2: #fafafc;
  --hover: #f3f3f8;
  --text: #191825;
  --text-2: #4b4a5a;
  --muted: #7a7989;
  --line: #e9e8ef;
  --line-2: #d9d8e2;
  --side: #17162a;
  --side-2: #232241;
  --side-3: #2e2c55;
  --side-text: #b9b6d6;
  --side-muted: #7d79a6;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --mention-bg: #fff6db;
  --mention-line: #f5b400;
  --shadow-sm: 0 1px 2px rgba(20, 18, 50, .06);
  --shadow: 0 8px 30px rgba(20, 18, 50, .12);
  --shadow-lg: 0 24px 70px rgba(20, 18, 50, .28);
  --radius: 12px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --accent: #7471ff;
  --accent-2: #9187ff;
  --accent-soft: #2a2950;
  --accent-text: #aeb0ff;
  --bg: #121220;
  --panel: #1a1a2b;
  --panel-2: #1f1f32;
  --hover: #232338;
  --text: #ebeaf5;
  --text-2: #c4c3d6;
  --muted: #8e8da6;
  --line: #2a2a40;
  --line-2: #36364f;
  --side: #0f0f1b;
  --side-2: #1b1a30;
  --side-3: #262546;
  --mention-bg: #3a3218;
  --mention-line: #d9a400;
  --shadow: 0 8px 30px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--text); background: var(--bg); font: 14.5px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent-text); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* SVG simgeler */
.ic { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex: none; }
.ic svg { width: 100%; height: 100%; display: block; }
[data-icon]:empty::before { content: ""; }

/* Düğmeler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-2); background: var(--panel); padding: 8px 15px; border-radius: 9px; font-weight: 600; font-size: 13.5px; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.primary:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.block { width: 100%; padding: 11px; }
.icon-btn { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.sm { width: 24px; height: 24px; }
.icon-btn.sm .ic { width: 15px; height: 15px; }

/* ---------- Giriş ---------- */
.auth { position: fixed; inset: 0; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); z-index: 40; }
.auth-side { background: radial-gradient(1200px 600px at -10% -20%, #6d5dfc 0%, transparent 60%), radial-gradient(900px 500px at 110% 120%, #00b3ff55 0%, transparent 60%), linear-gradient(160deg, #191736, #2b2470); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, transparent, #000 40%, transparent); pointer-events: none; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; position: absolute; top: 40px; left: 64px; }
.auth-side h1 { font-size: 40px; line-height: 1.12; margin: 0 0 14px; letter-spacing: -.02em; max-width: 460px; }
.auth-side p { color: #cfcbf5; font-size: 16px; max-width: 440px; margin: 0 0 28px; }
.auth-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-features li { display: flex; align-items: center; gap: 12px; color: #e6e3ff; }
.auth-features span { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.12); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; }
.auth-card h2 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.auth-card label, .card label, .card .label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.auth-card input, .card input:not([type=checkbox]) { padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); outline: none; font-size: 15px; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.auth-card input:focus, .card input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.hint-text { font-weight: 400; font-size: 12px; color: var(--muted); }
.error { color: var(--red); font-size: 13px; min-height: 1em; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

.logo-mark { width: 28px; height: 28px; border-radius: 8px; flex: none; background: linear-gradient(135deg, #7c6cf9, #5b5bf7); position: relative; box-shadow: 0 4px 14px rgba(91,91,247,.45); }
.logo-mark::after { content: ""; position: absolute; inset: 7px 6px 9px; background: #fff; border-radius: 3px; clip-path: polygon(0 0, 100% 0, 100% 75%, 45% 75%, 20% 100%, 22% 75%, 0 75%); }

/* ---------- Yerleşim ---------- */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr) auto; grid-template-rows: 100vh; height: 100vh; overflow: hidden; }
.sidebar { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 14px 10px 10px; gap: 10px; overflow: hidden; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 4px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 16.5px; letter-spacing: -.01em; min-width: 0; }
.brand .company-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 12px; background: var(--side-2); border: 1px solid var(--side-3); text-align: left; color: inherit; width: 100%; }
.me:hover { background: var(--side-3); }
.me .name { color: #fff; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.me .title { font-size: 12px; color: var(--side-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.role-tag { font-size: 9.5px; background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #3b2300; border-radius: 4px; padding: 1px 5px; font-weight: 800; letter-spacing: .04em; }
.search-wrap { position: relative; }
.search-wrap .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--side-muted); }
.search { width: 100%; background: var(--side-2); border: 1px solid transparent; border-radius: 9px; padding: 8px 10px 8px 32px; color: #fff; outline: none; font-size: 13.5px; }
.search:focus { border-color: var(--side-3); background: var(--side-3); }
.search::placeholder { color: var(--side-muted); }
.nav { overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; scrollbar-color: var(--side-3) transparent; }
.section { margin: 6px 0 14px; }
.section-head { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 0 10px; height: 26px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--side-muted); }
.section-head .icon-btn { color: var(--side-muted); }
.section-head .icon-btn:hover { background: var(--side-3); color: #fff; }
.section-head .count { font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.nav ul { list-style: none; margin: 2px 0 0; padding: 0; }
.nav li { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; position: relative; transition: background .12s; }
.nav li:hover { background: var(--side-2); color: #fff; }
.nav li.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 3px 12px rgba(91,91,247,.35); }
.nav li.unread { color: #fff; font-weight: 700; }
.nav li .prefix { width: 18px; display: inline-flex; justify-content: center; opacity: .75; }
.nav li .prefix .ic { width: 15px; height: 15px; }
.nav li .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.nav li .badge { margin-left: auto; background: var(--side-3); color: #fff; font-size: 11px; border-radius: 10px; padding: 0 7px; font-weight: 700; line-height: 18px; }
.nav li .badge.mention { background: var(--red); }
.nav li .call-hint { margin-left: auto; opacity: 0; color: #fff; width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; }
.nav li:hover .call-hint { opacity: .85; }
.nav li .call-hint:hover { background: var(--side-3); opacity: 1; }
.nav li .call-hint .ic { width: 15px; height: 15px; }
.nav li.offline { opacity: .6; }
.dm-empty { padding: 4px 10px; font-size: 12.5px; color: var(--side-muted); }
.nav li .dm-hint { margin-left: auto; }
.nav li .dm-hint + .call-hint { margin-left: 0; }
.chan-title .avatar { width: 26px; height: 26px; font-size: 11px; border-radius: 8px; }
.chan-title .avatar .status { border-color: var(--panel); }
.popover .pp-actions .btn.icon-only { flex: 0 0 auto; padding: 8px 11px; }
.side-footer { border-top: 1px solid var(--side-2); padding-top: 8px; display: grid; gap: 1px; }
.side-link { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: var(--side-text); text-align: left; padding: 7px 10px; border-radius: 8px; font-size: 13px; text-decoration: none; }
.side-link .ic { width: 16px; height: 16px; opacity: .8; }
.side-link:hover { background: var(--side-2); color: #fff; }

/* Avatarlar */
.avatar { flex: none; width: 36px; height: 36px; border-radius: 10px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13.5px; position: relative; letter-spacing: .02em; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); cursor: pointer; }
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; border-radius: 6px; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; border-radius: 6px; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; border-radius: 20px; }
.avatar .status { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: #8a89a0; border: 2.5px solid var(--side); }
.avatar .status.on { background: var(--green); }
.msg .avatar .status, .popover .avatar .status { border-color: var(--panel); }
.avatar.xs .status { width: 9px; height: 9px; border-width: 2px; right: -2px; bottom: -2px; }

/* ---------- Ana alan ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--panel); position: relative; }
.banner { background: linear-gradient(90deg, #fff4d6, #ffe9b8); color: #6b4b00; padding: 8px 20px; font-size: 13px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid #f3d58a; }
[data-theme="dark"] .banner { background: #3a3018; color: #f5d98b; border-color: #5a4a1e; }
.banner a { color: inherit; font-weight: 700; }
.chan-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 22px; border-bottom: 1px solid var(--line); min-height: 62px; background: var(--panel); }
.chan-info { min-width: 0; }
.chan-title { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 7px; letter-spacing: -.01em; }
.chan-title .ic { width: 18px; height: 18px; color: var(--muted); }
.chan-topic { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-actions { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.member-count { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 20px; font-weight: 600; font-size: 12.5px; }

.messages, .thread-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0 14px; }
.day-sep { display: flex; align-items: center; gap: 12px; margin: 18px 22px 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.day-sep span { border: 1px solid var(--line); border-radius: 20px; padding: 3px 12px; background: var(--panel); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.welcome { padding: 48px 28px 20px; }
.welcome .w-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.welcome .w-ico .ic { width: 28px; height: 28px; }
.welcome h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.01em; }
.welcome p { margin: 0; color: var(--muted); }
.skeleton { padding: 14px 22px; display: flex; gap: 12px; }
.skeleton .a { width: 36px; height: 36px; border-radius: 10px; }
.skeleton .l { height: 11px; border-radius: 6px; margin: 6px 0; }
.skeleton .a, .skeleton .l { background: linear-gradient(90deg, var(--hover) 25%, var(--line) 50%, var(--hover) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.msg { display: flex; gap: 12px; padding: 7px 22px; position: relative; transition: background .1s; }
.msg:hover { background: var(--panel-2); }
.msg.compact { padding-top: 1px; padding-bottom: 1px; }
.msg.compact > .avatar { visibility: hidden; height: 0; }
.msg.compact .hover-time { position: absolute; left: 22px; width: 36px; text-align: center; font-size: 10.5px; color: var(--muted); opacity: 0; top: 5px; }
.msg.compact:hover .hover-time { opacity: 1; }
.msg.mentioned { background: var(--mention-bg); box-shadow: inset 3px 0 0 var(--mention-line); }
.msg.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: color-mix(in srgb, var(--accent) 22%, transparent); } }
.msg-body { flex: 1; min-width: 0; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; }
.msg-meta .author { font-weight: 700; cursor: pointer; }
.msg-meta .author:hover { text-decoration: underline; }
.msg-meta .time { font-size: 12px; color: var(--muted); }
.msg-meta .role-tag { position: relative; top: -1px; }
.msg-text { white-space: pre-wrap; word-wrap: break-word; color: var(--text); }
.msg-text code { background: var(--hover); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; }
.msg-text pre { background: var(--hover); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 4px 0; overflow-x: auto; font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; white-space: pre; }
.msg-text a { color: var(--accent-text); text-decoration: none; }
.msg-text a:hover { text-decoration: underline; }
.mention { background: var(--accent-soft); color: var(--accent-text); border-radius: 5px; padding: 0 4px; font-weight: 600; cursor: pointer; }
.mention.self { background: #ffe58a; color: #5c3d00; }
[data-theme="dark"] .mention.self { background: #6b5410; color: #ffe58a; }
.chan-link { background: var(--accent-soft); color: var(--accent-text); border-radius: 5px; padding: 0 4px; font-weight: 600; cursor: pointer; }
.chan-link:hover, .mention:hover { filter: brightness(.95); text-decoration: none; }
.msg-text.big-emoji { font-size: 36px; line-height: 1.2; }
.edited { font-size: 11px; color: var(--muted); }

.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.attachments img { max-width: min(340px, 100%); max-height: 260px; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; display: block; transition: transform .15s; }
.attachments img:hover { transform: scale(1.01); }
.file-chip { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px 9px 10px; text-decoration: none; color: var(--text); background: var(--panel-2); max-width: min(340px, 100%); transition: border-color .15s; }
.file-chip:hover { border-color: var(--accent); }
.file-chip .ico { width: 38px; height: 38px; border-radius: 9px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 19px; flex: none; }
.file-chip .fname { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .fsize { font-size: 12px; color: var(--muted); }

.reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.reaction { border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 1px 9px; font-size: 13px; display: inline-flex; gap: 5px; align-items: center; height: 26px; transition: border-color .12s, background .12s; }
.reaction:hover { border-color: var(--line-2); }
.reaction.mine { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent-text); font-weight: 600; }
.reaction.add { color: var(--muted); opacity: 0; }
.msg:hover .reaction.add { opacity: 1; }
.reaction.add .ic { width: 15px; height: 15px; }

.reply-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 5px; border: 1px solid transparent; background: transparent; padding: 3px 8px 3px 4px; border-radius: 8px; color: var(--accent-text); font-weight: 700; font-size: 12.5px; }
.reply-link:hover { background: var(--panel); border-color: var(--line); }
.reply-link .avatars { display: flex; gap: 2px; }
.reply-link .when { color: var(--muted); font-weight: 400; }

.msg-tools { position: absolute; right: 22px; top: -16px; display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 2px; z-index: 2; }
.msg:hover .msg-tools { display: flex; }
.msg-tools button { border: 0; background: transparent; width: 32px; height: 30px; border-radius: 7px; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.msg-tools button:hover { background: var(--hover); color: var(--text); }
.msg-tools button .ic { width: 16px; height: 16px; }
.msg-tools .sep { width: 1px; background: var(--line); margin: 4px 2px; }

.typing { height: 22px; padding: 0 22px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.typing .dots { display: inline-flex; gap: 3px; }
.typing .dots i { width: 5px; height: 5px; background: var(--muted); border-radius: 50%; animation: blink 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; } .typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

/* Mesaj yazma alanı */
.composer-wrap { padding: 0 22px 18px; }
.composer { border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; position: relative; }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, var(--line-2)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.composer textarea { width: 100%; border: 0; outline: none; resize: none; padding: 12px 14px 6px; max-height: 220px; min-height: 44px; background: transparent; display: block; font-size: 14.5px; }
.composer textarea::placeholder { color: var(--muted); }
.composer .bar { display: flex; align-items: center; gap: 1px; padding: 4px 8px 8px; }
.composer .bar .spacer { flex: 1; }
.composer .bar .divider { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.composer .send { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: 0; border-radius: 9px; padding: 6px 14px; font-weight: 700; font-size: 13px; transition: opacity .15s; }
.composer .send .ic { width: 15px; height: 15px; }
.composer .send:disabled { background: var(--line-2); color: var(--muted); cursor: default; }
.composer .hint { font-size: 11.5px; color: var(--muted); margin-right: 10px; white-space: nowrap; }
.thread .composer .hint { display: none; }
@media (max-width: 1200px) { .composer .hint { display: none; } }
.pending { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; }
.pending .p { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 5px 28px 5px 6px; font-size: 12px; display: flex; align-items: center; gap: 8px; max-width: 230px; background: var(--panel-2); }
.pending .p img { width: 42px; height: 42px; object-fit: cover; border-radius: 7px; }
.pending .p .fi { width: 42px; height: 42px; border-radius: 7px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.pending .p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending .p button { position: absolute; right: 4px; top: 4px; border: 0; background: var(--hover); color: var(--muted); width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; }
.pending .p button .ic { width: 12px; height: 12px; }
.pending .p.loading { opacity: .55; }
.pending .p.loading::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 3px; height: 2px; background: var(--accent); border-radius: 2px; animation: load 1s infinite alternate; transform-origin: left; }
@keyframes load { from { transform: scaleX(.1); } to { transform: scaleX(1); } }
.readonly-note { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 14px; color: var(--muted); font-size: 13px; background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: 14px; }
.drop-hint { position: absolute; inset: 10px; border: 2px dashed var(--accent); border-radius: 16px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: var(--accent-text); pointer-events: none; z-index: 5; }
.drop-hint div { display: flex; gap: 10px; align-items: center; }

/* Etiket önerileri */
.mention-pop { position: fixed; z-index: 60; width: 300px; max-height: 280px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.mention-pop .mp-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 8px 6px; }
.mention-pop .mp-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.mention-pop .mp-item.on { background: var(--accent-soft); }
.mention-pop .mp-item .t { font-weight: 600; font-size: 13.5px; }
.mention-pop .mp-item .s { font-size: 12px; color: var(--muted); margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.mention-pop .mp-item .hash { width: 22px; height: 22px; border-radius: 6px; background: var(--hover); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.mention-pop .mp-item .hash .ic { width: 13px; height: 13px; }

/* Yanıt paneli */
.thread { width: 400px; border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.thread-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 14px 18px; border-bottom: 1px solid var(--line); min-height: 62px; }
.thread .msg { padding-left: 18px; padding-right: 18px; }
.thread .composer-wrap { padding: 0 16px 16px; }
.thread-count { margin: 8px 18px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px; font-weight: 600; }
.thread-count::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.thread .attachments img { max-width: 100%; }
@media (max-width: 980px) {
  .app { grid-template-columns: 220px minmax(0, 1fr); }
  .thread { position: fixed; right: 0; top: 0; bottom: 0; width: min(400px, 100vw); z-index: 20; box-shadow: var(--shadow-lg); }
}

/* Profil kartı */
.popover { position: fixed; z-index: 55; width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.popover .pp-cover { height: 64px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.popover .pp-body { padding: 0 18px 18px; margin-top: -36px; }
.popover .avatar.lg { border: 4px solid var(--panel); box-sizing: content-box; }
.popover .pp-name { font-size: 18px; font-weight: 800; margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.popover .pp-title { color: var(--text-2); font-size: 13.5px; }
.popover .pp-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: 10px; }
.popover .pp-row .ic { width: 15px; height: 15px; }
.popover .pp-actions { display: flex; gap: 8px; margin-top: 16px; }
.popover .pp-actions .btn { flex: 1; }

/* Modallar */
.overlay { position: fixed; inset: 0; background: rgba(12, 10, 30, .55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 50; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; width: min(460px, 92vw); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px; animation: pop .16s ease-out; }
.card h3 { margin: 0; font-size: 18px; }
.row { display: flex; gap: 8px; } .row.end { justify-content: flex-end; }
.member-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.member-list label, .member-list .member-row { flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; color: var(--text); font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--line); }
.member-list .member-row { display: flex; justify-content: space-between; }
.member-list > :last-child { border-bottom: 0; }
.lightbox { background: rgba(5, 5, 15, .85); cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 10px; box-shadow: var(--shadow-lg); }

/* Emoji seçici */
.emoji-picker { position: fixed; z-index: 60; width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; }
.emoji-picker .tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.emoji-picker .tabs button { border: 0; background: transparent; font-size: 18px; padding: 4px 7px; border-radius: 8px; }
.emoji-picker .tabs button.on { background: var(--accent-soft); }
.emoji-picker .grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 230px; overflow-y: auto; }
.emoji-picker .grid button { border: 0; background: transparent; font-size: 22px; padding: 4px; border-radius: 8px; transition: transform .08s; }
.emoji-picker .grid button:hover { background: var(--hover); transform: scale(1.15); }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #1d1c2e; color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 80; font-size: 14px; box-shadow: var(--shadow-lg); animation: toastIn .2s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Kurulum ve güncelleme ---------- */
.install-link { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 12px; text-decoration: none; color: var(--text); margin-top: 6px; }
.install-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.install-link > span:first-child { font-size: 24px; }
.install-link small { color: var(--muted); }
.side-link.install { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; margin-bottom: 4px; }
.side-link.install:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.version-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 10px 0; font-size: 11px; color: var(--side-muted); }
.version-line button { border: 0; background: transparent; color: var(--side-muted); font-size: 11px; padding: 2px 4px; border-radius: 5px; text-decoration: underline; text-underline-offset: 2px; }
.version-line button:hover { color: #fff; }
.update-banner { display: flex; align-items: center; gap: 12px; margin: 10px 16px 0; padding: 10px 12px 10px 14px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 40%, transparent); animation: pop .2s ease-out; }
.update-banner .ub-ico { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; }
.update-banner .ub-ico .ic { animation: spin 2.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.update-banner .ub-text { flex: 1; display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
.update-banner .ub-text span { opacity: .85; }
.update-banner .btn { background: rgba(255,255,255,.16); border-color: transparent; color: #fff; }
.update-banner .btn.primary { background: #fff; color: var(--accent-text); box-shadow: none; }
@media (display-mode: standalone) { .chan-header { min-height: 56px; } }

/* ---------- Sesli arama ---------- */
.call-overlay { background: rgba(10, 8, 30, .7); }
.call-card { width: 320px; padding: 34px 24px 28px; border-radius: 26px; background: linear-gradient(170deg, #26215a, #14122c); color: #fff; text-align: center; box-shadow: var(--shadow-lg); animation: pop .2s ease-out; }
.call-avatar { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; color: #fff; position: relative; }
.ringing .call-avatar::before, .ringing .call-avatar::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); animation: ring 1.6s infinite; }
.ringing .call-avatar::after { animation-delay: .8s; }
@keyframes ring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }
.call-name { font-size: 21px; font-weight: 800; }
.call-state { color: #c3bff0; margin-top: 4px; font-size: 14px; }
.call-btns { display: flex; justify-content: center; gap: 46px; margin-top: 28px; }
.round { width: 58px; height: 58px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); color: #fff; transition: transform .1s, filter .15s; }
.round:hover { filter: brightness(1.12); transform: scale(1.05); }
.round .ic { width: 24px; height: 24px; }
.round.green { background: var(--green); box-shadow: 0 6px 20px rgba(34,197,94,.45); }
.round.red { background: var(--red); box-shadow: 0 6px 20px rgba(239,68,68,.4); }
.round.sm { width: 40px; height: 40px; }
.round.sm .ic { width: 18px; height: 18px; }
.round.off { background: #fff; color: #1d1c2e; }
.call-bar { position: fixed; right: 22px; bottom: 22px; z-index: 45; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px; background: linear-gradient(160deg, #26215a, #14122c); color: #fff; box-shadow: var(--shadow-lg); min-width: 340px; animation: pop .18s ease-out; }
.call-avatar.sm { width: 42px; height: 42px; font-size: 16px; margin: 0; }
.call-bar.ringing .call-avatar.sm::before, .call-bar.ringing .call-avatar.sm::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); animation: ring 1.6s infinite; }
.cb-info { flex: 1; min-width: 0; }
.cb-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-state { font-size: 12.5px; color: #c3bff0; font-variant-numeric: tabular-nums; }
.level { display: flex; gap: 2px; align-items: flex-end; height: 18px; }
.level i { width: 3px; height: 4px; background: rgba(255,255,255,.35); border-radius: 2px; transition: height .08s; }
.level i.on { background: var(--green); }

/* Yönetici: özel mesaj incelemesi */
.inspect-btn { margin-top: 8px; border-style: dashed; color: var(--text-2); }
.inspect-btn:hover { border-color: var(--amber); color: var(--text); }
.ins-card { width: min(1040px, 96vw); height: min(84vh, 760px); padding: 0; gap: 0; overflow: hidden; }
.ins-top { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--mention-bg); }
.ins-top h3 { margin: 0; font-size: 17px; }
.ins-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); flex: 1; min-height: 0; }
.ins-list { border-right: 1px solid var(--line); overflow-y: auto; background: var(--panel-2); }
.ins-list .conv { display: flex; gap: 10px; align-items: center; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.ins-list .conv:hover { background: var(--hover); }
.ins-list .conv.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ins-list .conv b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-list .conv small { color: var(--muted); font-size: 12px; }
.ins-view { display: flex; flex-direction: column; min-height: 0; }
.ins-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.ins-msgs { flex: 1; overflow-y: auto; padding: 8px 0 16px; }
.ins-msgs .msg.ins-reply { padding-left: 58px; }
.ins-msgs .msg.ins-reply::before { content: ""; position: absolute; left: 40px; top: 0; bottom: 0; width: 2px; background: var(--line-2); }
.ins-tools { top: 4px; }
@media (max-width: 760px) { .ins-body { grid-template-columns: 1fr; } .ins-list { max-height: 30vh; border-right: 0; border-bottom: 1px solid var(--line); } }

/* ===== Kişisel temalar ===== */
html[data-accent] { --accent-soft: color-mix(in srgb, var(--accent) 13%, var(--panel)); --accent-text: color-mix(in srgb, var(--accent) 78%, var(--text)); }
html[data-accent="okyanus"] { --accent: #0284c7; --accent-2: #06b6d4; --side: #0b1e2d; --side-2: #13304a; --side-3: #1b3f5e; }
html[data-accent="orman"] { --accent: #15803d; --accent-2: #22c55e; --side: #0f1f17; --side-2: #173326; --side-3: #1f4232; }
html[data-accent="gunbatimi"] { --accent: #ea580c; --accent-2: #f43f5e; --side: #24140f; --side-2: #3a2018; --side-3: #4d2a20; }
html[data-accent="kiraz"] { --accent: #db2777; --accent-2: #e11d48; --side: #230f1a; --side-2: #3a1529; --side-3: #4d1c37; }
html[data-accent="grafit"] { --accent: #475569; --accent-2: #64748b; --side: #18181b; --side-2: #27272a; --side-3: #3f3f46; }
html[data-accent="gece"] { --accent: #6366f1; --accent-2: #8b5cf6; --side: #0b1020; --side-2: #141c33; --side-3: #1e2947; }
[data-theme="dark"][data-accent="grafit"] { --accent: #94a3b8; --accent-2: #cbd5e1; }
.logo-mark { background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 45%, transparent); }
.nav li.active { box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 35%, transparent); }
/* Sık görünüm */
html[data-density="sik"] { font-size: 13.5px; }
html[data-density="sik"] .msg { padding-top: 3px; padding-bottom: 3px; }
html[data-density="sik"] .msg .avatar:not(.sm):not(.xs) { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
html[data-density="sik"] .nav li { padding-top: 4px; padding-bottom: 4px; }
html[data-density="sik"] .day-sep { margin-top: 10px; }

/* Profil fotoğrafı */
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar.has-img { background: transparent !important; box-shadow: none; }
.call-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Görünüm ve profil penceresi */
.set-card { width: min(640px, 95vw); padding: 0; gap: 0; overflow: hidden; }
.set-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.set-top h3 { margin: 0; }
.tabs-bar { display: flex; gap: 4px; padding: 10px 20px 0; border-bottom: 1px solid var(--line); }
.tabs-bar button { border: 0; background: transparent; padding: 10px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-bar button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs-bar button .cnt { font-weight: 400; color: var(--muted); margin-left: 4px; }
.set-body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.photo-row { display: flex; gap: 20px; align-items: center; }
.photo-row .avatar { width: 96px; height: 96px; font-size: 34px; border-radius: 26px; }
.photo-row .btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; margin-top: 22px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.sec-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 22px; }
.theme-opt { border: 2px solid var(--line); border-radius: 12px; padding: 0; background: var(--panel); overflow: hidden; text-align: left; transition: border-color .12s, transform .12s; }
.theme-opt:hover { transform: translateY(-1px); }
.theme-opt.on { border-color: var(--accent); }
.theme-opt .pv { display: flex; height: 56px; }
.theme-opt .pv .sb { width: 34%; display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; }
.theme-opt .pv .sb i { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); }
.theme-opt .pv .sb i.a { background: var(--pa); }
.theme-opt .pv .mn { flex: 1; background: var(--panel-2); padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.theme-opt .pv .mn i { display: block; height: 5px; border-radius: 3px; background: var(--line-2); }
.theme-opt .pv .mn b { display: block; width: 40%; height: 9px; border-radius: 4px; background: linear-gradient(90deg, var(--pa), var(--pb)); margin-top: auto; }
.theme-opt span { display: block; padding: 7px 10px; font-size: 13px; font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 3px; margin-bottom: 22px; background: var(--panel-2); }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }

/* Kanal bilgileri paneli */
button.chan-title { border: 0; background: transparent; padding: 3px 8px; margin-left: -8px; border-radius: 8px; color: var(--text); cursor: pointer; font: inherit; font-weight: 800; font-size: 17px; }
button.chan-title:hover { background: var(--hover); }
button.chan-title::after { content: "⌄"; font-size: 13px; color: var(--muted); margin-left: 2px; position: relative; top: -2px; }
.member-count { cursor: pointer; background: transparent; }
.member-count:hover { background: var(--hover); }
.ch-card { width: min(620px, 95vw); padding: 0; gap: 0; overflow: hidden; }
.ch-card .set-body { background: var(--panel-2); min-height: 340px; }
.info-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.info-row { padding: 14px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.info-row:last-child { border-bottom: 0; }
.info-row .k { font-weight: 700; font-size: 14px; }
.info-row .v { grid-column: 1 / 2; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.info-row .v.empty-v { color: var(--muted); }
.info-row .edit { grid-row: 1 / 2; grid-column: 2; border: 0; background: transparent; color: var(--accent-text); font-weight: 600; font-size: 13px; padding: 0; }
.info-row .edit:hover { text-decoration: underline; }
.info-row .editor { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.info-row .editor input, .info-row .editor textarea { padding: 9px 11px; border: 1px solid var(--accent); border-radius: 9px; background: var(--panel); outline: none; font: inherit; }
.info-row .editor textarea { min-height: 80px; resize: vertical; }
.info-row .editor .row { justify-content: flex-end; }
.info-row .people { display: flex; flex-wrap: wrap; gap: 6px; }
.info-row .people .chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 20px; background: var(--hover); font-size: 13px; color: var(--text); cursor: pointer; }
.mem-search { width: 100%; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); outline: none; margin-bottom: 10px; }
.mem-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.mem-row:last-child { border-bottom: 0; }
.mem-row .nm { flex: 1; min-width: 0; }
.mem-row .nm b { display: block; font-size: 14px; }
.mem-row .nm small { color: var(--muted); }
.tagx { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); margin-left: 6px; vertical-align: middle; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.toggle-row small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 20px; transition: background .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }
.btn.danger-text { color: var(--red); }

/* Görüldü bilgisi */
.seen { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.seen.read { color: var(--accent-text); }
.seen .ic { width: 13px; height: 13px; }
.seen-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 1px 8px; font-size: 12px; color: var(--muted); }
.seen-chip:hover { border-color: var(--accent); color: var(--accent-text); }
.seen-chip .ic { width: 13px; height: 13px; }
.seen-pop { width: 290px; padding: 12px 0 8px; max-height: 380px; overflow-y: auto; }
.seen-pop h4 { margin: 0; padding: 4px 16px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.seen-pop .sr { display: flex; align-items: center; gap: 10px; padding: 6px 16px; }
.seen-pop .sr .t { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.seen-pop .sr b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seen-pop .none { padding: 4px 16px 10px; color: var(--muted); font-size: 13px; }
.ins-search { margin-left: auto; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); outline: none; width: 200px; }
.ins-filter { width: calc(100% - 20px); margin: 10px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); outline: none; }

/* ===== Sol simge şeridi ===== */
.app { grid-template-columns: 74px 268px minmax(0, 1fr) auto !important; }
@media (max-width: 980px) { .app { grid-template-columns: 64px 220px minmax(0, 1fr) !important; } }
.rail { background: color-mix(in srgb, var(--side) 72%, #000); display: flex; flex-direction: column; align-items: center; padding: 12px 0 14px; gap: 2px; overflow: hidden; border-right: 1px solid rgba(255,255,255,.04); }
.rail-logo { margin-bottom: 10px; }
.rail-logo .logo-mark { width: 36px; height: 36px; border-radius: 11px; }
.rail-logo .logo-mark::after { inset: 9px 8px 11px; }
.rail-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 66px; padding: 5px 0 7px; border: 0; background: transparent; color: var(--side-text); font-size: 11px; font-weight: 700; text-decoration: none; letter-spacing: .01em; cursor: pointer; }
.rail-item .ri { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; transition: background .15s, transform .1s; }
.rail-item .ri .ic { width: 21px; height: 21px; }
.rail-item:hover .ri { background: var(--side-2); color: #fff; }
.rail-item:active .ri { transform: scale(.95); }
.rail-item.on { color: #fff; }
.rail-item.on .ri { background: var(--side-3); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.rbadge { position: absolute; top: 0; right: 7px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid color-mix(in srgb, var(--side) 72%, #000); line-height: 1; }
.rbadge.dot { min-width: 0; width: 11px; height: 11px; padding: 0; top: 5px; right: 16px; background: var(--accent-2); }
.rail-sep { width: 30px; height: 1px; background: var(--side-3); margin: 8px 0; }
.rail-spacer { flex: 1; }
.rail-round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--side-2); color: var(--side-text); display: flex; align-items: center; justify-content: center; margin-top: 8px; transition: background .15s; }
.rail-round:hover { background: var(--side-3); color: #fff; }
.rail-round > span:not(.ic) { display: none; }
.rail-round .ic { width: 19px; height: 19px; }
.rail-me { margin-top: 12px; border: 0; background: transparent; padding: 0; border-radius: 13px; }
.rail-me .avatar { width: 42px; height: 42px; border-radius: 13px; font-size: 15px; }
.rail-me .avatar .status { border-color: color-mix(in srgb, var(--side) 72%, #000); width: 13px; height: 13px; }
.rail-me:hover .avatar { filter: brightness(1.1); }
#meBox { display: none; }
.sidebar { border-left: 0; }
.rail-menu { width: 250px; padding: 6px; }
.rail-menu button, .rail-menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: transparent; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 14px; text-align: left; }
.rail-menu button:hover, .rail-menu a:hover { background: var(--hover); }
.rail-menu .ic { width: 18px; height: 18px; color: var(--muted); }
.rail-menu small { display: block; color: var(--muted); font-size: 12px; }
.rail-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
/* Sol paneldeki görünümler (Mesajlar, Etkinlik, Dosyalar, Kişiler) */
.panel-view { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; display: flex; flex-direction: column; scrollbar-color: var(--side-3) transparent; }
.pv-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 10px; }
.pv-head h3 { margin: 0; color: #fff; font-size: 17px; }
.pv-head .icon-btn { color: var(--side-muted); }
.pv-head .icon-btn:hover { background: var(--side-3); color: #fff; }
.pv-search { width: 100%; background: var(--side-2); border: 1px solid transparent; border-radius: 9px; padding: 8px 10px; color: #fff; outline: none; font-size: 13.5px; margin-bottom: 10px; }
.pv-search::placeholder { color: var(--side-muted); }
.pv-seg { display: flex; gap: 4px; margin-bottom: 10px; }
.pv-seg button { flex: 1; border: 0; background: var(--side-2); color: var(--side-text); padding: 6px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.pv-seg button.on { background: var(--accent); color: #fff; }
.pv-item { display: flex; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; color: var(--side-text); }
.pv-item:hover { background: var(--side-2); }
.pv-item.active { background: var(--side-3); }
.pv-item.unread { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.pv-item .avatar { width: 34px; height: 34px; flex: none; }
.pv-item .body { flex: 1; min-width: 0; }
.pv-item .top { display: flex; gap: 6px; align-items: baseline; }
.pv-item .top b { color: #fff; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-item .top .t { margin-left: auto; font-size: 11px; color: var(--side-muted); white-space: nowrap; }
.pv-item .what { font-size: 11.5px; color: var(--side-muted); }
.pv-item .snip { font-size: 13px; color: var(--side-text); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.pv-item.unread .snip { color: #fff; font-weight: 600; }
.pv-item .kind { width: 18px; height: 18px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--side-3); flex: none; }
.pv-item .kind .ic { width: 12px; height: 12px; }
.pv-item .fthumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--side-2); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.pv-empty { color: var(--side-muted); text-align: center; padding: 30px 10px; font-size: 13px; }
.pv-section { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--side-muted); padding: 10px 8px 4px; }
.pv-new { width: 100%; margin-bottom: 10px; justify-content: center; }

/* @Etiket grupları */
.mention.group { background: color-mix(in srgb, var(--amber) 18%, var(--panel)); color: color-mix(in srgb, var(--amber) 70%, var(--text)); }
.mention.group.self { background: #ffe58a; color: #5c3d00; }
[data-theme="dark"] .mention.group.self { background: #6b5410; color: #ffe58a; }
.mention-pop .mp-item .grp { width: 22px; height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--amber) 22%, var(--panel)); color: color-mix(in srgb, var(--amber) 70%, var(--text)); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.grp-pop-head { padding: 2px 16px 10px; }
.grp-pop-head b { font-size: 16px; display: block; }
.grp-pop-head .h { color: var(--accent-text); font-weight: 700; }
.grp-pop-head p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.grp-card { width: min(520px, 95vw); }
.grp-card .handle-wrap { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); overflow: hidden; }
.grp-card .handle-wrap span { padding: 0 4px 0 12px; font-weight: 800; color: var(--muted); font-size: 16px; }
.grp-card .handle-wrap input { border: 0 !important; box-shadow: none !important; flex: 1; padding-left: 2px !important; }
.grp-card .handle-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.grp-members { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.grp-members label { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); color: var(--text) !important; font-weight: 500 !important; cursor: pointer; }
.grp-members label:last-child { border-bottom: 0; }
.grp-members label small { color: var(--muted); margin-left: auto; font-weight: 400; }
.grp-stack { display: flex; }
.grp-stack .avatar { width: 22px; height: 22px; font-size: 9px; border-radius: 7px; margin-left: -6px; box-shadow: 0 0 0 2px var(--side); }
.grp-stack .avatar:first-child { margin-left: 0; }
.pv-item .ghandle { color: #fbbf24; font-weight: 800; font-size: 13.5px; }

.empty-note { padding: 24px 22px 8px; color: var(--muted); font-size: 13px; }

/* ===== Yandan uyarı kartları ===== */
.notif-stack { position: fixed; top: 16px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 24px)); pointer-events: none; }
.ncard { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px 12px 14px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; box-shadow: var(--shadow-lg); cursor: pointer; animation: nIn .28s cubic-bezier(.2,.9,.3,1.2); position: relative; overflow: hidden; }
.ncard.mention, .ncard.dm { border-left-color: var(--red); }
.ncard.out { animation: nOut .22s ease-in forwards; }
@keyframes nIn { from { opacity: 0; transform: translateX(110%); } }
@keyframes nOut { to { opacity: 0; transform: translateX(110%); } }
.ncard .avatar { width: 38px; height: 38px; }
.ncard .nb { flex: 1; min-width: 0; }
.ncard .nt { font-weight: 700; font-size: 13.5px; display: flex; gap: 6px; align-items: baseline; }
.ncard .nt span { color: var(--muted); font-weight: 500; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ncard .nk { font-size: 11.5px; color: var(--accent-text); font-weight: 700; margin-top: 1px; }
.ncard.mention .nk, .ncard.dm .nk { color: var(--red); }
.ncard .nm { font-size: 13.5px; color: var(--text-2); margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.ncard .nx { border: 0; background: transparent; color: var(--muted); width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex: none; }
.ncard .nx:hover { background: var(--hover); color: var(--text); }
.ncard .nx .ic { width: 14px; height: 14px; }
.ncard .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); opacity: .5; animation: nBar 6s linear forwards; }
.ncard:hover .bar { animation-play-state: paused; }
@keyframes nBar { from { width: 100%; } to { width: 0; } }
.notif-ask { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; background: var(--side-2); border: 1px solid var(--side-3); border-radius: 12px; color: var(--side-text); font-size: 12.5px; }
.notif-ask b { color: #fff; display: block; font-size: 13px; }
.notif-ask small { display: block; color: var(--side-muted); }
.notif-ask > div { flex: 1; min-width: 0; }
.m-back { display: none; }

/* ===== Telefon görünümü (yalnızca dar ekranlarda) ===== */
@media (max-width: 760px) {
  html, body { overscroll-behavior: none; }
  .app { display: block !important; height: 100dvh; }
  .rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; flex-direction: row; justify-content: space-around; align-items: center; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); gap: 0; border-right: 0; border-top: 1px solid rgba(255,255,255,.06); }
  .rail-logo, .rail-sep, .rail-spacer, #adminLink, #themeBtn { display: none !important; }
  .rail-item { flex: 1; width: auto; padding: 4px 0; font-size: 10.5px; }
  .rail-item .ri { width: 34px; height: 30px; border-radius: 10px; }
  .rail-round, .rail-me { margin: 0 6px; }
  .rail-round { width: 36px; height: 36px; }
  .rail-me .avatar { width: 34px; height: 34px; border-radius: 11px; }
  .rbadge { right: calc(50% - 26px); }
  .rbadge.dot { right: calc(50% - 18px); }
  .sidebar { position: fixed; left: 0; right: 0; top: 0; bottom: calc(60px + env(safe-area-inset-bottom)); padding-top: calc(12px + env(safe-area-inset-top)); }
  .main { position: fixed; inset: 0; z-index: 35; transform: translateX(100%); transition: transform .22s ease; padding-top: env(safe-area-inset-top); }
  body.m-chat .main { transform: none; }
  body.m-chat .rail { display: none; }
  .thread { position: fixed !important; inset: 0 !important; width: 100vw !important; z-index: 45 !important; padding-top: env(safe-area-inset-top); }
  .m-back { display: inline-flex; margin-left: -8px; }
  .chan-header { padding: 8px 12px; min-height: 54px; gap: 6px; }
  .chan-header .chan-info { flex: 1; }
  #addMemberBtn, #dmCallBtn span:not(.ic) { display: none; }
  .msg { padding-left: 12px; padding-right: 12px; }
  .msg-tools { right: 8px; top: -12px; }
  .msg:hover .msg-tools { display: none; }
  .msg.tools-open .msg-tools { display: flex; }
  .day-sep { margin-left: 12px; margin-right: 12px; }
  .composer-wrap { padding: 0 8px calc(8px + env(safe-area-inset-bottom)); }
  .composer textarea { font-size: 16px; }
  .composer .bar button[title="Kalın"], .composer .bar button[title="İtalik"], .composer .bar button[title="Kod"], .composer .bar .divider, .composer .hint { display: none; }
  .attachments img { max-width: 100%; }
  .notif-stack { top: calc(8px + env(safe-area-inset-top)); right: 8px; left: 8px; width: auto; }
  .typing { padding: 0 12px; }
  .call-bar { left: 8px; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom)); min-width: 0; }
  body.m-chat .call-bar { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ===== İki adımlı doğrulama ===== */
.tfa-card { width: min(440px, 95vw); }
.tfa-steps { padding-left: 20px; margin: 10px 0; color: var(--text-2); font-size: 13.5px; }
.tfa-steps li { margin: 5px 0; }
.tfa-qr { display: block; width: 200px; height: 200px; margin: 6px auto; border-radius: 12px; background: #fff; padding: 8px; }
.tfa-secret { display: block; text-align: center; font-size: 15px; letter-spacing: 2px; background: var(--hover); border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 6px; word-break: break-all; user-select: all; }
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0; }
.recovery-grid code { background: var(--hover); border: 1px solid var(--line); border-radius: 7px; padding: 8px; text-align: center; font-size: 14px; letter-spacing: 1px; user-select: all; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
