/* Platform — tek stil dosyası. Açık/koyu tema: html[data-theme]; "system" işletim sistemi tercihini izler. */
:root {
  --bg: #f4f6f8; --surface: #ffffff; --surface-2: #f0f2f5; --border: #dde2e8; --text: #16202b; --muted: #5d6b7a;
  --primary: #0f6e5c; --primary-ink: #ffffff; --primary-soft: #dff3ee; --accent: #2563eb;
  --danger: #c0352b; --danger-soft: #fdecea; --warn: #9a6700; --warn-soft: #fff4d6; --ok: #1a7f37; --ok-soft: #e3f6e8;
  --mine: #d9f4e9; --theirs: #ffffff; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --radius: 12px; --radius-s: 8px; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif; --fs: 15px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1419; --surface: #182029; --surface-2: #202a35; --border: #2c3846; --text: #e6edf3; --muted: #93a1b0;
    --primary: #2bb594; --primary-ink: #04201a; --primary-soft: #143a32; --accent: #6ea8fe;
    --danger: #ff7b72; --danger-soft: #3b1d1b; --warn: #e3b341; --warn-soft: #3a2f12; --ok: #56d364; --ok-soft: #12301b;
    --mine: #1f4a3e; --theirs: #202a35; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1419; --surface: #182029; --surface-2: #202a35; --border: #2c3846; --text: #e6edf3; --muted: #93a1b0;
  --primary: #2bb594; --primary-ink: #04201a; --primary-soft: #143a32; --accent: #6ea8fe;
  --danger: #ff7b72; --danger-soft: #3b1d1b; --warn: #e3b341; --warn-soft: #3a2f12; --ok: #56d364; --ok-soft: #12301b;
  --mine: #1f4a3e; --theirs: #202a35; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
:root[data-font="small"] { --fs: 14px; }
:root[data-font="large"] { --fs: 17px; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: var(--fs)/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 1rem; display: block; }
.pre, .policy-text { white-space: pre-wrap; word-break: break-word; }
.danger-text { color: var(--danger); }
.only-mobile { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------- form ve düğmeler */
input, select, textarea {
  font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s);
  padding: .55rem .7rem; width: 100%; min-height: 40px;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 2px solid var(--primary-soft); }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
textarea { resize: vertical; }
label { display: block; font-weight: 500; }
label > input, label > select, label > textarea { margin-top: .3rem; font-weight: 400; }
label small { display: block; font-weight: 400; margin-top: .25rem; }
label.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: .2rem; flex: none; }
.label { font-weight: 600; margin: .5rem 0 .25rem; }
.form { display: flex; flex-direction: column; gap: .85rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-s); padding: .75rem; }
legend { font-weight: 600; padding: 0 .35rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .5rem 1rem; border-radius: var(--radius-s); min-height: 40px;
  text-decoration: none !important; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.small { padding: .3rem .7rem; min-height: 32px; font-size: .9em; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { background: none; border: 0; color: inherit; font-size: 1.15rem; cursor: pointer; border-radius: 50%; width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.small { width: 28px; height: 28px; font-size: .95rem; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-align: left; }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.copy-row { display: flex; gap: .5rem; }

.banner { padding: .65rem .9rem; border-radius: var(--radius-s); background: var(--surface-2); margin-bottom: 1rem; }
.banner.error { background: var(--danger-soft); color: var(--danger); }
.banner.success { background: var(--ok-soft); color: var(--ok); }
.banner.warn { background: var(--warn-soft); color: var(--warn); margin: 0; border-radius: 0; }
.banner.info { background: var(--primary-soft); }
.tag { display: inline-block; font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 600; vertical-align: middle; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.badge { background: var(--primary); color: var(--primary-ink); border-radius: 999px; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; min-width: 1.3rem; text-align: center; margin-left: auto; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card.narrow { max-width: 460px; margin: 0 auto; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-page { min-height: 60vh; display: grid; place-items: center; padding: 1rem; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.empty.big { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero { font-size: 3.5rem; opacity: .6; }

/* ------------------------------------------------------------- giriş sayfaları */
.auth-shell { min-height: 100%; display: flex; flex-direction: column; }
.auth-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; }
.auth-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 1rem; }
.auth-card { width: 100%; max-width: 440px; margin-top: 4vh; }
.auth-links { display: flex; flex-direction: column; gap: .4rem; margin-top: 1rem; text-align: center; }
.auth-footer { text-align: center; padding: 1rem; color: var(--muted); font-size: .85rem; }
.lang-switch { display: flex; gap: .6rem; }
.lang-switch a.active { font-weight: 700; color: var(--text); }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none !important; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 800; }
.policies details { border-bottom: 1px solid var(--border); padding: .4rem 0; }
.policies .policy-text { max-height: 240px; overflow: auto; background: var(--surface-2); padding: .6rem; border-radius: var(--radius-s); font-size: .9em; }
.lead { font-size: 1.05rem; }

/* ------------------------------------------------------------- uygulama iskeleti */
.app-shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar { width: 248px; flex: none; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 1rem; }
.nav { flex: 1; overflow-y: auto; padding: 0 .5rem; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .75rem; border-radius: var(--radius-s); color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav a.sub { padding-left: 1.6rem; font-size: .92em; }
.nav .ico { width: 1.4rem; text-align: center; }
.sidebar-user { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-top: 1px solid var(--border); }
.sidebar-user .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-user .who strong, .sidebar-user .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: var(--muted); }
.sidebar-user form { margin: 0; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.main > .page, .main > .chats-page { flex: 1; overflow: auto; }
.topbar { align-items: center; gap: .5rem; padding: .5rem .75rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.page { padding: 1.5rem; max-width: 980px; width: 100%; margin: 0 auto; }
.page.narrow { max-width: 520px; }
.page-head, .section-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap; }
.section-head h2, .section-head h3 { margin: 0; }
.tabs { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: 1rem; scrollbar-width: thin; }
.tabs.wrap { flex-wrap: wrap; }
.tabs > button, .tabs > a { background: var(--surface-2); border: 1px solid transparent; color: var(--text); padding: .35rem .8rem; border-radius: 999px; cursor: pointer; white-space: nowrap; font: inherit; font-size: .9em; text-decoration: none; }
.tabs > .on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); font-weight: 600; }

/* avatar */
.avatar { position: relative; width: var(--s); height: var(--s); flex: none; display: inline-block; }
.avatar img, .avatar .initials { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.avatar .initials { background: hsl(var(--h, 160) 45% 42%); color: #fff; font-weight: 700; font-size: calc(var(--s) * .38); }
.avatar .dot { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 9px; min-height: 9px; background: #22c55e; border: 2px solid var(--surface); border-radius: 50%; }

/* ------------------------------------------------------------- sohbetler */
.chats-page { display: flex; height: 100%; overflow: hidden; }
.chat-list { width: 360px; flex: none; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; overflow: hidden; }
.chat-list .list-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1rem .5rem; }
.chat-list .list-head h1 { margin: 0; }
.chat-list .search { margin: 0 1rem .5rem; width: auto; }
.chat-list .tabs { padding: 0 1rem .25rem; margin-bottom: .25rem; }
.chat-list .items { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.chat-list .item { display: flex; gap: .7rem; padding: .65rem 1rem; color: var(--text); text-decoration: none; align-items: center; }
.chat-list .item:hover { background: var(--surface-2); }
.chat-list .item.active { background: var(--primary-soft); }
.item-main { flex: 1; min-width: 0; }
.item-main .row { display: flex; gap: .5rem; align-items: center; justify-content: space-between; }
.item-main .title, .item-main .preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-main .preview { color: var(--muted); font-size: .9em; flex: 1; }
.item-main .tag { margin-right: .3rem; }
.chat-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }

.conversation { display: flex; height: 100%; min-height: 0; }
.conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.conv-main.dropping::after { content: ""; position: absolute; inset: 8px; border: 3px dashed var(--primary); border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 8%, transparent); pointer-events: none; }
.conv-head { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.conv-title { display: flex; align-items: center; gap: .65rem; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; flex: 1; min-width: 0; font: inherit; padding: .2rem; border-radius: var(--radius-s); }
.conv-title span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.conv-title strong, .conv-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-head .actions { display: flex; }
.space-bar { background: var(--warn-soft); color: var(--warn); font-size: .82rem; padding: .25rem .9rem; }
.pin-bar, .search-bar { background: var(--surface); border-bottom: 1px solid var(--border); padding: .4rem .9rem; font-size: .9em; }
.search-bar .hits { list-style: none; margin: .4rem 0 0; padding: 0; max-height: 200px; overflow: auto; }
.search-bar .hits li { padding: .2rem 0; }
.messages { flex: 1; overflow-y: auto; padding: 1rem clamp(.5rem, 3vw, 2rem); display: flex; flex-direction: column; gap: .2rem; }
.older { text-align: center; margin-bottom: .5rem; }
.day-sep { text-align: center; margin: .75rem 0 .4rem; }
.day-sep span { background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: .1rem .7rem; font-size: .78rem; }
.sys-msg { align-self: center; background: var(--surface-2); color: var(--muted); font-size: .82rem; border-radius: var(--radius-s); padding: .2rem .7rem; margin: .3rem 0; text-align: center; max-width: 90%; }
.msg { display: flex; align-items: flex-start; gap: .25rem; max-width: min(78%, 680px); position: relative; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.theirs { align-self: flex-start; }
.bubble { background: var(--theirs); border: 1px solid var(--border); border-radius: 14px; padding: .4rem .65rem .3rem; min-width: 70px; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--mine); border-color: transparent; }
.msg.deleted .bubble { opacity: .75; }
.msg.flash .bubble { animation: flash 1.5s; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: var(--shadow); } }
.sender { font-weight: 700; font-size: .82rem; color: hsl(var(--h) 55% 40%); }
:root[data-theme="dark"] .sender { color: hsl(var(--h) 65% 68%); }
.fwd { font-size: .78rem; color: var(--muted); font-style: italic; }
.reply-ref { display: block; width: 100%; text-align: left; background: color-mix(in srgb, var(--text) 6%, transparent); border: 0; border-left: 3px solid var(--primary); border-radius: 6px; padding: .25rem .5rem; margin: .1rem 0 .3rem; cursor: pointer; color: inherit; font: inherit; font-size: .85em; }
.reply-ref strong { display: block; font-size: .9em; color: var(--primary); }
.reply-ref span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text { white-space: pre-wrap; }
.meta { display: flex; gap: .35rem; justify-content: flex-end; align-items: center; font-size: .72rem; color: var(--muted); margin-top: .1rem; }
.ticks.read { color: #2f9bff; }
.reactions { display: flex; gap: .25rem; flex-wrap: wrap; margin-top: .25rem; }
.reaction { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 .45rem; font-size: .82rem; cursor: pointer; color: inherit; }
.reaction.mine { border-color: var(--primary); background: var(--primary-soft); }
.msg-actions { opacity: 0; transition: opacity .15s; position: relative; }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; }
.menu { position: absolute; top: 100%; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); min-width: 200px; padding: .3rem; display: flex; flex-direction: column; }
.msg.mine .menu { right: 0; }
.msg.theirs .menu { left: 0; }
.menu > button { background: none; border: 0; text-align: left; padding: .45rem .6rem; border-radius: 6px; cursor: pointer; color: inherit; font: inherit; }
.menu > button:hover { background: var(--surface-2); }
.menu .danger { color: var(--danger); }
.emoji-row { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); padding-bottom: .3rem; margin-bottom: .2rem; }
.emoji-row button { background: none; border: 0; font-size: 1.15rem; cursor: pointer; padding: .15rem; border-radius: 6px; }
.emoji-row button:hover { background: var(--surface-2); }
.typing { color: var(--muted); font-size: .85rem; font-style: italic; padding: .2rem .4rem; }
.attachment { margin: .2rem 0; }
.attachment img { max-width: min(320px, 100%); max-height: 320px; border-radius: 10px; display: block; height: auto; }
.attachment video { max-width: min(360px, 100%); border-radius: 10px; display: block; }
.attachment audio { max-width: 280px; }
.file-chip { display: inline-flex; align-items: center; gap: .6rem; background: color-mix(in srgb, var(--text) 6%, transparent); border-radius: 10px; padding: .45rem .7rem; color: inherit; text-decoration: none !important; max-width: 320px; }
.file-chip span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.file-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip.danger { color: var(--danger); }
.composer { background: var(--surface); border-top: 1px solid var(--border); padding: .5rem .75rem; }
.composer.readonly { text-align: center; color: var(--muted); padding: 1rem; }
.compose-row { display: flex; gap: .4rem; align-items: flex-end; }
.compose-row textarea { min-height: 42px; max-height: 180px; resize: none; border-radius: 20px; padding: .55rem .9rem; }
.btn.send { border-radius: 50%; width: 42px; height: 42px; padding: 0; }
.compose-ref { display: flex; justify-content: space-between; align-items: center; gap: .5rem; background: var(--surface-2); border-left: 3px solid var(--primary); border-radius: 6px; padding: .3rem .6rem; margin-bottom: .4rem; font-size: .88em; }
.compose-ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploads, .chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .4rem; }
.chip { display: inline-flex; gap: .35rem; align-items: center; background: var(--surface-2); border-radius: 999px; padding: .15rem .6rem; font-size: .85em; }
.chip.error { background: var(--danger-soft); color: var(--danger); }
.chat-info { width: 340px; flex: none; background: var(--surface); border-left: 1px solid var(--border); overflow-y: auto; padding: 0 1rem 1rem; }
.chat-info > header { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); padding: .75rem 0; z-index: 1; }
.chat-info > header h2 { margin: 0; }
.info-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.info-hero h3 { margin: .3rem 0 0; font-size: 1.15rem; }
.section { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.section summary { cursor: pointer; font-weight: 600; }
.section .form { margin-top: .75rem; }
.members, .people, .pick-list, .notif-list, .activity { list-style: none; margin: 0; padding: 0; }
.members li, .people li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; }
.members select { width: auto; min-height: 32px; padding: .2rem .4rem; }
.people li { border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.danger-zone .btn { margin-bottom: .5rem; }
.pick-list { max-height: 320px; overflow-y: auto; margin-top: .5rem; }
.pick { display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: 0; padding: .45rem .5rem; border-radius: var(--radius-s); cursor: pointer; color: inherit; font: inherit; text-align: left; }
.pick:hover { background: var(--surface-2); }
.pick.on { background: var(--primary-soft); }
.pick .ok { margin-left: auto; color: var(--primary); font-weight: 800; }
.notif-list li { display: flex; gap: .75rem; padding: .75rem; border-bottom: 1px solid var(--border); }
.notif-list li.unread { background: var(--primary-soft); border-radius: var(--radius-s); }
.notif-list p { margin: .15rem 0; }
.activity li { padding: .35rem 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ------------------------------------------------------------- tablolar ve yönetim */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92em; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .85em; white-space: nowrap; }
tr:hover td { background: var(--surface-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; }
.stat strong { display: block; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .85em; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.filters input, .filters select { width: auto; min-width: 180px; flex: 1; }
.codes { columns: 2; font-size: 1.05rem; }
.qr { width: 200px; height: 200px; background: #fff; padding: 6px; border-radius: 8px; margin: .5rem 0; }
.qr svg { width: 100%; height: 100%; }
.secret { word-break: break-all; }
.steps li { margin-bottom: .75rem; }
.steps .row-actions input { width: 140px; }
.avatar-row { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.ticket { border-bottom: 1px solid var(--border); padding: .5rem 0; }
.ticket summary { cursor: pointer; }
.ticket .reply { background: var(--primary-soft); padding: .6rem; border-radius: var(--radius-s); }
.wizard-steps { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.wizard-steps span { padding: .2rem .7rem; border-radius: 999px; background: var(--surface-2); font-size: .85em; }
.wizard-steps span.on { background: var(--primary); color: var(--primary-ink); }
.import-rows td.error { color: var(--danger); }

/* ------------------------------------------------------------- modal, bildirim balonu, arama */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: grid; place-items: center; z-index: 100; padding: 1rem; }
.modal { background: var(--surface); border-radius: var(--radius); width: min(520px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal.wide { width: min(860px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--border); }
.modal header h2 { margin: 0; }
.modal-body { padding: 1.1rem; overflow-y: auto; }
.toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; z-index: 200; width: min(420px, calc(100% - 2rem)); }
.toast { background: var(--text); color: var(--bg); padding: .65rem 1rem; border-radius: var(--radius-s); box-shadow: var(--shadow); }
.toast.error { background: var(--danger); color: #fff; }
.toast.success { background: var(--ok); color: #fff; }
.call-overlay { position: fixed; z-index: 300; inset: auto 1rem 1rem auto; width: min(360px, calc(100% - 2rem)); background: #0b141a; color: #fff; border-radius: 16px; padding: 1rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.call-overlay.video { width: min(720px, calc(100% - 2rem)); }
.call-title { font-weight: 700; font-size: 1.15rem; }
.call-status { color: #b8c4ce; font-variant-numeric: tabular-nums; }
.call-overlay video#call-remote { width: 100%; max-height: 60vh; background: #000; border-radius: 10px; }
.call-overlay video#call-local { position: absolute; right: 1.5rem; top: 4.5rem; width: 28%; border-radius: 8px; border: 2px solid #fff; background: #000; }
.call-actions { display: flex; gap: 1rem; margin-top: .5rem; }
.call-btn { width: 54px; height: 54px; border-radius: 50%; border: 0; font-size: 1.35rem; cursor: pointer; background: #2a3942; color: #fff; }
.call-btn.end { background: #e5484d; }
.call-btn.accept { background: #22c55e; }
.call-toast { position: fixed; bottom: 1rem; right: 1rem; z-index: 300; background: #0b141a; color: #fff; padding: .7rem 1rem; border-radius: 10px; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--warn-soft); color: var(--warn); padding: .7rem 1rem; z-index: 1000; }
#blazor-error-ui .reload { margin-left: .5rem; }
#components-reconnect-modal { z-index: 1000; }

/* ------------------------------------------------------------- mobil */
@media (max-width: 860px) {
  .only-mobile { display: inline-grid !important; }
  .topbar.only-mobile { display: flex !important; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .app-shell.menu-open .sidebar { transform: none; }
  .chat-list { width: 100%; border-right: 0; }
  .chats-page.show-chat .chat-list { display: none; }
  .chats-page.show-list .chat-pane { display: none; }
  .chat-info { position: fixed; inset: 0; width: 100%; z-index: 40; }
  .msg { max-width: 90%; }
  .msg-actions { opacity: 1; }
  .page { padding: 1rem; }
  .row2 { grid-template-columns: 1fr; }
  .codes { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
/* sohbet arka planı tercihi */
:root[data-bg="dots"] .messages { background-image: radial-gradient(color-mix(in srgb, var(--text) 10%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
:root[data-bg="waves"] .messages { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--primary) 6%, transparent) 0 12px, transparent 12px 24px); }
:root[data-bg="plain"] .messages { background: var(--surface); }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 1rem 0; }
dl.details dt { color: var(--muted); font-weight: 600; }
dl.details dd { margin: 0; }
.page.wide { max-width: 1200px; }
code.big { font-size: 1.15rem; padding: .2rem .5rem; }
@media (max-width: 860px) { dl.details { grid-template-columns: 1fr; } }
.filters label.check { flex: none; align-items: center; white-space: nowrap; }
.filters input[type="checkbox"] { min-width: 0; flex: none; }
