/* Lumina Web — renkler mobil uygulamadaki Palette değerleriyle aynıdır (Core/Ui.cs). */
:root {
  --brand: #1459B5;
  --brand-deep: #0F4387;
  --danger: #E53935;
  --read: #53BDEB;
  --ok: #1E9E5A;
  --bg: #FFFFFF;
  --surface: #F0F2F5;
  --text: #111B21;
  --sub: #667781;
  --divider: #E9EDEF;
  --chat-bg: #EEF2F7;
  --bubble-in: #FFFFFF;
  --bubble-out: #D8E8FC;
  --system: rgba(255, 255, 255, .9);
  --title: #0F4387;
  --pill: #DCE9FB;
  --on-pill: #0F4387;
  --hover: #F5F6F6;
  --shadow: 0 12px 40px rgba(11, 20, 26, .18);
  --font: Roboto, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0B141A;
  --surface: #1F2C34;
  --text: #E9EDEF;
  --sub: #8696A0;
  --divider: #222D34;
  --chat-bg: #0B141A;
  --bubble-in: #1F2C34;
  --bubble-out: #134A8E;
  --system: #182229;
  --title: #FFFFFF;
  --pill: #123A6B;
  --on-pill: #A8CBF7;
  --hover: #17232B;
  --shadow: 0 12px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.4 var(--font); color: var(--text); background: var(--surface); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
h1, h2, h3, h4, p { margin: 0; }
img { display: block; }
a { color: var(--brand); }
:root[data-theme="dark"] a { color: #7FB3F5; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon { fill: currentColor; flex: none; }
.muted { color: var(--sub); }
.pre { white-space: pre-wrap; }
.spacer { flex: 1; }
.hot { color: var(--brand) !important; }
:root[data-theme="dark"] .hot { color: #7FB3F5 !important; }
.missed { color: var(--danger) !important; }
#app { height: 100%; }

.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--pill); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.spinner.center { margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot, .fatal { height: 100%; display: grid; place-items: center; place-content: center; gap: 14px; text-align: center; padding: 24px; background: var(--bg); }
.fatal p { color: var(--sub); max-width: 34em; }

/* Düğmeler */
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--sub); flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.brand { color: var(--brand); }
.btn { padding: 10px 22px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; }
.btn:hover { background: var(--brand-deep); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--pill); }
.btn.danger { background: var(--danger); }
.btn.ghost.danger { background: transparent; color: var(--danger); }
:root[data-theme="dark"] .btn.ghost { color: #7FB3F5; }

.avatar { border-radius: 50%; flex: none; display: inline-grid; place-items: center; color: #fff; font-weight: 600; overflow: hidden; background: var(--brand); user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.verified { color: var(--brand); display: inline-flex; vertical-align: -3px; margin-left: 4px; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.tag { margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--on-pill); background: var(--pill); padding: 2px 8px; border-radius: 8px; white-space: nowrap; }

/* ---------- Giriş ---------- */
.login { min-height: 100%; height: 100%; overflow: auto; background: linear-gradient(var(--brand) 0 220px, var(--surface) 220px); padding: 0 20px 40px; }
.login-top { max-width: 1000px; margin: 0 auto; height: 96px; display: flex; align-items: center; gap: 12px; color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.login-card { max-width: 1000px; margin: 0 auto; background: var(--bg); border-radius: 22px; box-shadow: var(--shadow); padding: clamp(24px, 5vw, 60px); display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.login-steps h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 500; color: var(--title); margin-bottom: 28px; }
.login-steps ol { margin: 0; padding-left: 22px; display: grid; gap: 16px; font-size: 17px; }
.login-note { margin-top: 32px; display: flex; gap: 8px; color: var(--sub); font-size: 13.5px; max-width: 34em; }
.login-qr { display: grid; justify-items: center; gap: 14px; }
.qr-box { width: 300px; height: 300px; border-radius: 18px; border: 1px solid var(--divider); background: #fff; display: grid; place-items: center; padding: 10px; }
.qr-box svg { width: 100%; height: 100%; }
.qr-hint { color: var(--sub); font-size: 14px; text-align: center; }

/* ---------- İskelet ---------- */
/* Satır yüksekliği pencereyle sınırlı: listeler ve mesajlar kendi içinde kayar, sayfa taşmaz. */
.shell { height: 100%; width: 100%; display: grid; grid-template-columns: 76px minmax(300px, 420px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); background: var(--bg); }
.rail { min-height: 0; overflow-y: auto; background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; border-right: 1px solid var(--divider); }
.rail-logo { margin-bottom: 12px; }
.tab { display: grid; justify-items: center; gap: 3px; width: 68px; padding: 4px 0; color: var(--sub); }
.tab small { font-size: 11px; font-weight: 500; }
.tab .pill { position: relative; width: 56px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background .15s; }
.tab:hover .pill { background: var(--hover); }
.tab.on { color: var(--text); }
.tab.on .pill { background: var(--pill); color: var(--on-pill); }
.tab.on small { font-weight: 700; }
.tab .badge { position: absolute; top: -6px; right: -4px; }
.rail .me { border-radius: 50%; }

.pane { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--divider); background: var(--bg); }
.pane-head { display: flex; align-items: center; gap: 2px; padding: 14px 10px 8px 18px; min-height: 64px; }
.pane-head h1 { flex: 1; font-size: 24px; font-weight: 700; color: var(--title); display: flex; align-items: center; gap: 8px; }
:root[data-theme="light"] .pane-head h1.brand { color: var(--brand); }
.search { margin: 4px 14px 10px; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; padding: 0 16px; color: var(--sub); }
.search input { flex: 1; border: 0; background: transparent; padding: 11px 0; outline: none; min-width: 0; color: var(--text); }
.chips { display: flex; gap: 8px; padding: 0 14px 10px; }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--surface); color: var(--sub); font-size: 14px; font-weight: 500; }
.chip.on { background: var(--pill); color: var(--on-pill); font-weight: 600; }
.list { flex: 1; overflow-y: auto; min-height: 0; }
.list.in-modal { max-height: 50vh; margin: 0 -8px; }
.list h4, .modal-body h4, .info h4 { padding: 16px 18px 6px; font-size: 13px; font-weight: 600; color: var(--brand); text-transform: none; }
:root[data-theme="dark"] .list h4, :root[data-theme="dark"] .modal-body h4 { color: #7FB3F5; }
.empty { padding: 36px 28px; text-align: center; color: var(--sub); }

.row { width: 100%; display: flex; align-items: center; gap: 13px; padding: 10px 16px; min-height: 68px; }
button.row:hover, .row.active { background: var(--hover); }
.row.active { background: var(--surface); }
.row:disabled { cursor: default; }
.row.slim { min-height: 52px; }
.row.picked { background: var(--pill); }
.row.danger b, .line.danger, .line.danger b { color: var(--danger); }
.row-icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--brand); flex: none; }
:root[data-theme="dark"] .row-icon { color: #7FB3F5; }
.row.setting .row-icon { color: var(--sub); }
.row.danger .row-icon { color: var(--danger); }
.row-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.row-main > * { min-width: 0; }
.row-main b { font-weight: 500; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-top { display: flex; align-items: baseline; gap: 8px; }
.row-top b { flex: 1; min-width: 0; }
.row-top time { font-size: 12px; color: var(--sub); flex: none; }
.row-bottom { display: flex; align-items: center; gap: 6px; }
/* Blok düzeni: uzun önizleme "…" ile kesilir (esnek kutuda üç nokta çıkmaz). */
.preview { flex: 1; min-width: 0; color: var(--sub); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.preview .tick, .preview .dir { vertical-align: -3px; margin-right: 3px; }
.preview .dir { display: inline-flex; color: var(--ok); }
.mini { color: var(--sub); display: inline-flex; }
.count { color: var(--brand); font-weight: 600; font-size: 13px; }
.tick { display: inline-flex; color: var(--sub); flex: none; }
.tick.read { color: var(--read); }
.pick { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.row.profile { padding: 16px 18px; }
.row.profile b { font-size: 19px; }
.foot-note { display: flex; justify-content: center; gap: 6px; color: var(--sub); font-size: 12.5px; padding: 22px; }

.stage { min-width: 0; min-height: 0; display: flex; background: var(--chat-bg); position: relative; }
.placeholder { margin: auto; text-align: center; display: grid; justify-items: center; gap: 12px; padding: 30px; max-width: 460px; color: var(--sub); }
.placeholder h2 { font-size: 30px; font-weight: 300; color: var(--title); }
.placeholder .lock { display: flex; gap: 6px; align-items: center; font-size: 13px; margin-top: 18px; }
.banner { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); background: #FFF3C4; color: #5C4A06; padding: 8px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; z-index: 40; box-shadow: var(--shadow); }

/* ---------- Sohbet ---------- */
.chat { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-head { flex: none; display: flex; align-items: center; gap: 2px; padding: 8px 10px 8px 14px; background: var(--bg); border-bottom: 1px solid var(--divider); min-height: 62px; }
.chat-id { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 2px 6px; border-radius: 12px; }
.chat-id:hover { background: var(--hover); }
.chat-id > span:not(.avatar) { min-width: 0; display: grid; }
.chat-id b { font-weight: 500; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-id small { color: var(--sub); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.only-narrow { display: none; }

.msgs { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px max(16px, 7%); display: flex; flex-direction: column; gap: 3px; }
.day, .note { align-self: center; background: var(--system); color: var(--sub); font-size: 12.5px; padding: 5px 12px; border-radius: 9px; margin: 8px 0; box-shadow: 0 1px 1px rgba(11, 20, 26, .08); text-align: center; max-width: 86%; }
.note.lock { background: #FFF3C4; color: #5C4A06; display: flex; gap: 6px; align-items: center; }
:root[data-theme="dark"] .note.lock { background: #2B2A1E; color: #E6D48A; }
.note.call-note { display: flex; align-items: center; gap: 7px; color: var(--text); }
.note.call-note time { color: var(--sub); font-size: 11px; margin-left: 4px; }
.msg { display: flex; min-width: 0; }
.msg.out { justify-content: flex-end; }
.bubble { position: relative; min-width: 0; max-width: min(70%, 620px); padding: 6px 9px 7px; border-radius: 4px 14px 14px 14px; background: var(--bubble-in); box-shadow: 0 1px 1px rgba(11, 20, 26, .1); display: grid; gap: 3px; overflow-wrap: anywhere; }
.bubble.out { background: var(--bubble-out); border-radius: 14px 4px 14px 14px; }
.bubble .sender { font-size: 13px; font-weight: 600; }
.bubble > * { min-width: 0; }
.bubble .text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-size: 14.5px; }
.bubble .gone { color: var(--sub); font-size: 14px; }
.bubble .meta { justify-self: end; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--sub); margin-top: -1px; }
.bubble.out .meta { color: color-mix(in srgb, var(--text) 55%, transparent); }
.bubble.out .tick { color: color-mix(in srgb, var(--text) 50%, transparent); }
.bubble.out .tick.read { color: var(--read); }
.bubble-menu { position: absolute; top: 2px; right: 3px; width: 26px; height: 24px; border-radius: 12px; display: none; place-items: center; color: var(--sub); background: inherit; }
.bubble.in .bubble-menu { background: var(--bubble-in); }
.bubble.out .bubble-menu { background: var(--bubble-out); }
.bubble:hover .bubble-menu, .bubble-menu:focus-visible { display: grid; }
.quote { display: grid; gap: 1px; padding: 5px 9px; border-radius: 8px; border-left: 4px solid var(--brand); background: color-mix(in srgb, var(--text) 7%, transparent); font-size: 13px; max-width: 100%; }
.quote b { color: var(--brand); font-weight: 600; }
:root[data-theme="dark"] .quote b { color: #7FB3F5; }
.quote span { color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-frame { min-width: 180px; min-height: 120px; display: grid; place-items: center; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--text) 6%, transparent); }
.photo { max-width: 100%; max-height: 340px; cursor: zoom-in; }
.file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--text) 6%, transparent); min-width: 220px; color: var(--sub); }
.file > span:nth-child(2) { flex: 1; min-width: 0; display: grid; color: var(--text); }
.file b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file small { color: var(--sub); }
.file-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .9); display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 94vh; }
.lightbox .icon-btn { position: absolute; top: 14px; right: 14px; color: #fff; }

.composer { flex: none; background: var(--bg); border-top: 1px solid var(--divider); padding: 8px 12px; }
.compose-row { display: flex; align-items: flex-end; gap: 6px; }
.input-wrap { flex: 1; background: var(--surface); border-radius: 22px; padding: 9px 16px; display: flex; }
.input-wrap textarea { flex: 1; border: 0; background: transparent; resize: none; outline: none; max-height: 140px; line-height: 1.4; }
.icon-btn.send { background: var(--brand); color: #fff; width: 44px; height: 44px; }
.icon-btn.send:hover { background: var(--brand-deep); color: #fff; }
.reply-bar { display: flex; align-items: center; gap: 8px; margin: 0 46px 8px; padding: 6px 6px 6px 12px; border-left: 4px solid var(--brand); border-radius: 8px; background: var(--surface); }
.reply-bar > span { flex: 1; min-width: 0; display: grid; }
.reply-bar b { color: var(--brand); font-size: 13px; }
.reply-bar small { color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readonly { text-align: center; color: var(--sub); font-size: 13.5px; padding: 8px; }
.attach-list { display: grid; gap: 10px; justify-items: center; margin-bottom: 14px; max-height: 50vh; overflow: auto; }
.attach-preview { max-width: 100%; max-height: 320px; border-radius: 12px; }

/* ---------- Pencere, menü, bildirim ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(11, 20, 26, .55); display: grid; place-items: center; padding: 16px; }
.modal { width: min(460px, 100%); max-height: 92vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.modal.wide { width: min(640px, 100%); }
.modal > header { display: flex; align-items: center; padding: 14px 10px 6px 22px; }
.modal > header h2 { flex: 1; font-size: 19px; font-weight: 600; color: var(--title); }
.modal-body { padding: 10px 22px 18px; overflow-y: auto; display: grid; gap: 12px; }
.modal > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 16px 16px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--sub); }
.field input, .field textarea, .field select, .modal-body > input[type="text"] { padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--divider); background: var(--bg); color: var(--text); font-size: 15px; font-weight: 400; outline: none; width: 100%; }
.field input:focus, .field textarea:focus, .field select:focus, .modal-body > input[type="text"]:focus { border-color: var(--brand); }
.switch, .radio { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.switch span { display: grid; }
.switch small { color: var(--sub); }
.switch input, .radio input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.choices { display: grid; }
.menu { position: fixed; z-index: 80; min-width: 210px; padding: 6px; border-radius: 16px; background: var(--bg); box-shadow: var(--shadow); border: 1px solid var(--divider); display: grid; }
.menu button { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; color: var(--text); }
.menu button .icon { color: var(--sub); }
.menu button:hover { background: var(--hover); }
.menu button.danger, .menu button.danger .icon { color: var(--danger); }
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(92vw, 520px); }
.toast { background: #1F2C34; color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); transition: opacity .35s; text-align: center; }
.toast.bad { background: #B3261E; }
.toast.out { opacity: 0; }

/* Bilgi penceresi */
.info { display: grid; gap: 2px; margin: 0 -10px; }
.info-top { display: grid; justify-items: center; gap: 6px; padding: 8px 0 16px; text-align: center; }
.info-top h3 { font-size: 21px; font-weight: 500; }
.line { width: 100%; display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-radius: 12px; color: var(--sub); }
button.line:hover { background: var(--hover); }
.line > span { display: grid; min-width: 0; color: var(--text); }
.line b { font-weight: 500; }
.line small { color: var(--sub); }
.info h4 { padding: 14px 14px 4px; }
.info .row { border-radius: 12px; padding: 8px 14px; min-height: 56px; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.avatar-edit > div { display: grid; justify-items: start; }

/* ---------- Durum ---------- */
.ring { padding: 2px; border-radius: 50%; border: 2.5px solid var(--brand); display: inline-grid; position: relative; flex: none; }
.ring.seen { border-color: color-mix(in srgb, var(--sub) 45%, transparent); }
.ring.none { border-color: transparent; }
.ring .plus { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; border: 2px solid var(--bg); }
.status-compose { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; color: #fff; transition: background .2s; }
.status-compose header { display: flex; padding: 12px; gap: 4px; }
.status-compose .icon-btn { color: #fff; }
.status-compose .icon-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.status-compose textarea { flex: 1; margin: 0 auto; width: min(760px, 92%); background: transparent; border: 0; outline: none; resize: none; color: #fff; font-size: clamp(22px, 4vw, 34px); font-weight: 500; text-align: center; padding-top: 22vh; }
.status-compose textarea::placeholder { color: rgba(255, 255, 255, .75); }
.viewer { position: fixed; inset: 0; z-index: 60; background: #0B141A; display: grid; place-items: center; user-select: none; }
.viewer-card { position: relative; height: min(100vh, 900px); aspect-ratio: 9 / 16; max-width: 100vw; background: #000; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; color: #fff; }
.bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.bars i b { display: block; height: 100%; width: 0; background: #fff; }
.bars i.done b { width: 100% !important; }
.viewer-head { position: absolute; top: 22px; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 0 8px 26px 14px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.viewer-head > span:not(.avatar) { flex: 1; display: grid; min-width: 0; }
.viewer-head small { opacity: .85; font-size: 12px; }
.viewer-head .icon-btn { color: #fff; }
.viewer-head .icon-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.viewer-body { flex: 1; display: grid; place-items: center; min-height: 0; }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-body .say { font-size: clamp(22px, 3.4vh, 30px); font-weight: 500; text-align: center; padding: 28px; white-space: pre-wrap; overflow-wrap: anywhere; }
.viewer-foot { position: absolute; bottom: 18px; left: 0; right: 0; z-index: 3; display: grid; justify-items: center; }
.views { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 22px; background: rgba(0, 0, 0, .6); color: #fff; font-weight: 600; }
.zone { position: absolute; top: 70px; bottom: 70px; width: 35%; z-index: 2; }
.zone.left { left: 0; }
.zone.right { right: 0; width: 65%; }

/* ---------- Arama ---------- */
.call { position: fixed; inset: 0; z-index: 100; color: #fff; display: flex; flex-direction: column; align-items: center; background: linear-gradient(160deg, #1B6FE0 0%, #0F4387 45%, #071A36 100%); }
.call video.remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #071A36; visibility: hidden; }
.call.video.has-remote video.remote { visibility: visible; }
.call video.local { position: absolute; right: 22px; top: 22px; width: min(22vw, 220px); aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; transform: scaleX(-1); border: 2px solid rgba(255, 255, 255, .35); box-shadow: 0 6px 18px rgba(0, 0, 0, .6); z-index: 2; background: #1F2C34; }
.call-info { position: relative; z-index: 1; margin-top: 9vh; display: grid; justify-items: center; gap: 10px; text-align: center; }
.call-info small { display: flex; gap: 6px; align-items: center; opacity: .85; }
.call-info h2 { font-size: 30px; font-weight: 500; }
.call-state { font-size: 17px; opacity: .9; font-variant-numeric: tabular-nums; }
.call.video.has-remote .pulse { display: none; }
.call.video.has-remote .call-info { margin-top: 26px; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.pulse { margin: 34px 0 26px; border-radius: 50%; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .28), 0 0 0 0 rgba(255, 255, 255, .16); } 100% { box-shadow: 0 0 0 26px rgba(255, 255, 255, 0), 0 0 0 54px rgba(255, 255, 255, 0); } }
.call-controls { position: relative; z-index: 1; margin-top: auto; margin-bottom: 7vh; display: flex; gap: 30px; }
.round { display: grid; justify-items: center; gap: 8px; color: #fff; font-size: 13px; }
.round .icon { width: 64px; height: 64px; padding: 18px; border-radius: 50%; background: rgba(255, 255, 255, .18); transition: background .15s; }
.round:hover .icon { background: rgba(255, 255, 255, .28); }
.round.on .icon { background: #fff; color: #0F4387; }
.round.red .icon { background: var(--danger); }
.round.green .icon { background: #1FAF5F; }

/* ---------- Dar ekran (telefon tarayıcısı) ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .rail { grid-row: 2; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--divider); background: var(--bg); }
  .rail-logo, .rail .spacer, .rail .me { display: none; }
  .pane { grid-row: 1; border-right: 0; }
  .stage { position: fixed; inset: 0; z-index: 20; display: none; }
  body.stage-open .stage { display: flex; }
  .only-narrow { display: inline-grid; }
  .msgs { padding: 12px 10px; }
  .bubble { max-width: 86%; }
  .login-card { grid-template-columns: 1fr; justify-items: center; }
  .call video.local { width: 30vw; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse, .spinner { animation-duration: 0s; animation-iteration-count: 1; }
}
