/* SAHNE · TOPLU MESAJ (includes/scenes/messaging.php) — modül sayfası /modul/iletisim. Adımlar:
   s1 Sınıf → 8-A (19) · s2 Gönderilecek: Veli (36) · s3 kanal «Uygulama içi» · s4 sayfa Mesaj'a kayar, şablon seçilir ·
   s5 «Uygula» → konu + içerik (ipucu ve kapalı düğme kalır) · s6 konuya « (8-A)» yazılır → ipucu kalkar, gönder açılır ·
   s7 «Mesajı gönder» → onay penceresi · s8 «Gönder» → sayfa başı yeşil ileti + rapor · s9 velinin kilit ekranına bildirim ·
   s10 bildirime dokunulur → portalda mesaj.
   Durumlar: «msg-k-all» = tüm öğrenciler (s0 ve sayfa yeniden yüklenince s8+), «msg-k-cls» = 8-A öğrenci (s1), «msg-k-veli» =
   8-A veli (s2–s7); kanal «msg-c-em» E-posta (öntanım) / «msg-c-in» Uygulama içi (s3–s7); şablon «msg-t-sel» (s4–s7);
   dolu form «msg-f-on» (s5–s7); «Konu alanı zorunlu.» «msg-h-on» (s0–s5, s8+).
   Ölçüler değişkenlerde: kaydırma, sınıf panelinin yeri ve sonuç bandı aynı değişkenlerden hesaplanır. */
@property --msg-n { syntax: '<integer>'; inherits: false; initial-value: 0; }

.msg { container-type: inline-size; --dl: 0s; --spring: cubic-bezier(.34, 1.56, .64, 1); }
/* ölçü değişkenleri pencerede (kap sorgusu kabın kendisini değil içindekileri biçimler) */
.msg-win { --H: 472px; --pad: 10px; --side: 236px; --gap: 10px; --cx: 14px;
  --bandH: 100px; --kimeH: 202px; --fldB: 188px; --rh: 103px; --sc4: 266px; --sc5: var(--sc4); --edH: 92px;
  --cardW: calc(100cqw - 2px - 2 * var(--pad) - var(--gap) - var(--side));
  --pnlR: calc(var(--side) + var(--gap) + var(--pad) + var(--cx));
  --fldW: calc((var(--cardW) - 2 * var(--cx) - 12px) / 2);
  --ok-50: #ecfdf5; --ok-200: #a7f3d0; --ok-800: #065f46; --bl-50: #eff6ff; --bl-200: #bfdbfe; --bl-800: #1e40af; --bl-900: #1e3a8a;
  --bad: #b91c1c; --amb: #b45309; --z: #f1f2f4; --zl: #d4d9e0; --ink: #18202e; --ink2: #3f4756; --mut: #6a7486; }
.msg.s1 { --dl: 1s; } .msg.s2 { --dl: .42s; } .msg.s3 { --dl: .42s; } .msg.s4 { --dl: 1.38s; } .msg.s5 { --dl: .45s; }
.msg.s6 { --dl: .62s; } .msg.s7 { --dl: 0s; } .msg.s8 { --dl: .6s; } .msg.s9 { --dl: 0s; }
.msg-i { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* çapraz geçiş: katmanlar aynı ızgara hücresinde üst üste */
.msg-x { display: grid; min-width: 0; }
.msg-x > * { grid-area: 1 / 1; min-width: 0; }
.msg .msg-o { opacity: 0; translate: 0 3px; transition: opacity .28s var(--ui-ease) var(--dl), translate .34s var(--ui-ease) var(--dl); }
.msg:not(.s1) .msg-o.msg-k-all, .msg.s8 .msg-o.msg-k-all, .msg:not(.s1) .msg-o.msg-k-nosel, .msg.s8 .msg-o.msg-k-nosel,
.msg.s1:not(.s2) .msg-o.msg-k-cls, .msg.s2:not(.s8) .msg-o.msg-k-veli, .msg.s1:not(.s8) .msg-o.msg-k-sel,
.msg:not(.s1) .msg-o.msg-w-all, .msg.s8 .msg-o.msg-w-all, .msg.s1:not(.s2) .msg-o.msg-w-cls, .msg.s2:not(.s3) .msg-o.msg-w-veli,
.msg:not(.s3) .msg-o.msg-c-em, .msg.s8 .msg-o.msg-c-em, .msg.s3:not(.s8) .msg-o.msg-c-in,
.msg:not(.s4) .msg-o.msg-t-none, .msg.s8 .msg-o.msg-t-none, .msg.s4:not(.s8) .msg-o.msg-t-sel,
.msg:not(.s5) .msg-o.msg-f-off, .msg.s8 .msg-o.msg-f-off, .msg.s5:not(.s8) .msg-o.msg-f-on,
.msg:not(.s6) .msg-o.msg-h-on, .msg.s8 .msg-o.msg-h-on { opacity: 1; translate: 0 0; }

/* sayaçlar (ileri/geri sayar): --n0 tüm · --n1 8-A öğrenci · --n2 8-A veli · --n3 kanal uygulama içi */
.msg-n { --msg-n: var(--a); counter-reset: n var(--msg-n); font-variant-numeric: tabular-nums; transition: --msg-n .55s var(--ui-ease) var(--dl); }
.msg-n::after { content: counter(n); }
.msg.s1:not(.s8) .msg-n { --msg-n: var(--b); }
.msg.s2:not(.s8) .msg-n { --msg-n: var(--c); }
.msg.s3:not(.s8) .msg-n { --msg-n: var(--d, var(--c)); }

/* imleç: .msg-hit tıklama noktasıdır; ok ucu tam orada, halka dalgası çevresinde */
.msg-hit { position: absolute; z-index: 7; width: 0; height: 0; pointer-events: none; }
.msg-hit .ui-cur { left: -5px; top: -3px; transform: translate(14px, 12px); transition: opacity .2s var(--ui-ease); }
.msg-rip { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(29, 79, 134, .55); opacity: 0; }
@keyframes msg-cur { 0% { opacity: 0; transform: translate(14px, 12px); } 36% { opacity: 1; transform: none; scale: 1; } 50% { scale: .8; } 62%, 100% { opacity: 1; transform: none; scale: 1; } }
@keyframes msg-cur-out { 0% { opacity: 0; transform: translate(14px, 12px); } 34% { opacity: 1; transform: none; scale: 1; } 48% { scale: .8; } 60% { scale: 1; } 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes msg-rip { 0% { opacity: 0; scale: .25; } 12% { opacity: .9; } 100% { opacity: 0; scale: 1.7; } }
@keyframes msg-push { 50% { scale: .95; } }

/* ── pencere ve sayfa ── */
.msg-win { position: relative; height: var(--H); border-radius: 14px; background: #f3f5f8; overflow: hidden; }
.msg-win::after { content: ""; position: absolute; z-index: 25; inset: 0; background: rgba(11, 28, 51, .16); opacity: 0; transition: opacity .45s var(--ui-ease); pointer-events: none; }
.msg-page { position: absolute; left: 0; right: 0; top: 0; padding: var(--pad); translate: 0 calc(-1 * var(--rh)); transition: translate .6s cubic-bezier(.3, .8, .25, 1); }
.msg-res { height: calc(var(--rh) - var(--gap)); margin-bottom: var(--gap); opacity: 0; transition: opacity .35s var(--ui-ease); }
.msg-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: var(--gap); height: calc(var(--H) - 2 * var(--pad)); }

/* sonuç (sayfa yeniden yüklenince başta) — uygulamadaki yeşil ileti + mavi «Gönderim raporu» */
.msg-flash { display: flex; align-items: center; min-height: 34px; padding: 8px 12px; border-radius: 12px; background: var(--ok-50); box-shadow: inset 0 0 0 1.5px var(--ok-200);
  font-size: 11.5px; font-weight: 800; line-height: 16px; color: var(--ok-800); text-wrap: pretty; }
.msg-rep { margin-top: 8px; padding: 8px 12px 9px; border-radius: 12px; background: var(--bl-50); box-shadow: inset 0 0 0 1.5px var(--bl-200); line-height: 16px; }
.msg-rep b { display: block; font-size: 11.5px; font-weight: 800; color: var(--bl-900); }
.msg-rep span { display: flex; align-items: center; gap: 7px; margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--bl-800); }
.msg-rep i { flex: none; width: 4px; height: 4px; margin-left: 4px; border-radius: 50%; background: currentColor; }

/* ── sol: form kartı ── */
.msg-card { position: relative; min-width: 0; border-radius: 14px; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 1px var(--ui-line), 0 1px 2px rgba(16, 37, 64, .05), 0 14px 30px -22px rgba(16, 37, 64, .45); }
.msg-card::after { content: ""; position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 18px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); pointer-events: none; }
.msg-scr { translate: 0 0; transition: translate .62s cubic-bezier(.32, .12, .2, 1); }

/* bant + kanal sekmeleri */
.msg-band { height: var(--bandH); padding: 12px var(--cx) 0; color: #fff; background: linear-gradient(120deg, var(--navy-night), var(--navy) 55%, var(--navy-soft));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.msg-band__h { display: flex; align-items: center; gap: 10px; height: 46px; }
.msg-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24); }
.msg-ico .msg-i { width: 17px; height: 17px; stroke-width: 1.9; }
.msg-ttl { flex: 1; min-width: 0; }
.msg-ttl b { display: block; font-size: 14.5px; font-weight: 800; line-height: 18px; letter-spacing: -.01em; }
.msg-ttl small { display: block; font-size: 10.5px; font-weight: 600; line-height: 14px; color: rgba(214, 228, 245, .92); text-wrap: balance; }
.msg-tabs { position: relative; display: flex; gap: 2px; height: 32px; margin-top: 10px; }
.msg-tab { position: relative; isolation: isolate; flex: none; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 9px; border-radius: 10px 10px 0 0;
  font-size: 11.5px; font-weight: 800; color: rgba(255, 255, 255, .86); white-space: nowrap; transition: color .25s var(--ui-ease) var(--dl); }
.msg-tab .msg-i { width: 13px; height: 13px; }
.msg-tab::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: #fff; opacity: 0; transition: opacity .25s var(--ui-ease) var(--dl); }
.msg:not(.s3) .msg-tab--em, .msg.s8 .msg-tab--em, .msg.s3:not(.s8) .msg-tab--in { color: var(--navy); }
.msg:not(.s3) .msg-tab--em::before, .msg.s8 .msg-tab--em::before, .msg.s3:not(.s8) .msg-tab--in::before { opacity: 1; }
.msg-tab--in .msg-hit { left: 58%; top: 21px; }
.msg.s3:not(.s4) .msg-hit--tab .ui-cur { animation: msg-cur-out .8s var(--ui-ease) both; }
.msg.s3:not(.s4) .msg-hit--tab .msg-rip { animation: msg-rip .55s ease-out .3s both; }

/* Kime */
.msg-kime { height: var(--kimeH); padding: 12px var(--cx) 0; }
.msg-lg { display: flex; align-items: center; gap: 7px; height: 18px; margin-bottom: 8px; font-size: 12.5px; font-weight: 800; color: var(--ink); }
.msg-lg .msg-i { width: 14px; height: 14px; color: var(--navy-soft); }
.msg-seg { position: relative; display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--z); box-shadow: inset 0 0 0 1px rgba(16, 37, 64, .04); }
.msg-seg > span { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 7px;
  font-size: 11px; font-weight: 800; color: #5b6373; white-space: nowrap; transition: color .25s var(--ui-ease) var(--dl); }
.msg-seg > span .msg-i { width: 12px; height: 12px; }
.msg-seg > span::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: #fff; opacity: 0;
  box-shadow: 0 1px 2px rgba(16, 37, 64, .14), 0 0 0 1px rgba(16, 37, 64, .05); transition: opacity .25s var(--ui-ease) var(--dl); }
.msg-seg > span.msg-on, .msg:not(.s2) .msg-seg__ogr, .msg.s8 .msg-seg__ogr, .msg.s2:not(.s8) .msg-seg__veli { color: var(--navy); }
.msg-seg > span.msg-on::before, .msg:not(.s2) .msg-seg__ogr::before, .msg.s8 .msg-seg__ogr::before, .msg.s2:not(.s8) .msg-seg__veli::before { opacity: 1; }
.msg-seg--kitle { margin-bottom: 10px; }
.msg-lb { display: flex; align-items: center; gap: 4px; height: 14px; font-size: 10px; font-weight: 800; letter-spacing: .05em; line-height: 14px; text-transform: uppercase; color: #5d6676; }
.msg-lb .msg-i { width: 11px; height: 11px; }
.msg-lb em { font-style: normal; letter-spacing: 0; text-transform: none; color: var(--mut); }
.msg-row { display: flex; align-items: center; gap: 8px; height: 30px; margin: 4px 0 12px; }
.msg-seg__veli .msg-hit { left: 64%; top: 17px; }
.msg.s2:not(.s3) .msg-hit--veli .ui-cur { animation: msg-cur-out .8s var(--ui-ease) both; }
.msg.s2:not(.s3) .msg-hit--veli .msg-rip { animation: msg-rip .55s ease-out .3s both; }
.msg-yak { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border-radius: 8px; font-size: 11px; font-weight: 700; color: var(--ink2); white-space: nowrap;
  box-shadow: inset 0 0 0 1px #dfe3e9; opacity: 0; translate: -4px 0; transition: opacity .3s var(--ui-ease) var(--dl), translate .4s var(--ui-ease) var(--dl); }
.msg-yak .msg-i { width: 12px; height: 12px; color: var(--navy-soft); }
.msg-yak .msg-chev { color: var(--mut); }
.msg.s2:not(.s8) .msg-yak { opacity: 1; translate: 0 0; }
.msg-flds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.msg-fld { display: block; min-width: 0; }
.msg-fld .msg-lb { margin-bottom: 4px; }
.msg-in { position: relative; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px #dde2e8;
  font-size: 12px; font-weight: 700; color: var(--ink2); }
.msg-in__t { flex: 1; min-width: 0; white-space: nowrap; }
.msg-tri { flex: none; width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 4.5px solid #a3abb8; }
.msg-tag { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 2px 0 7px; border-radius: 6px; background: #eaf1f9; box-shadow: inset 0 0 0 1px #c9d9eb;
  font-size: 11px; font-weight: 800; color: #163e6a; }
.msg-tag i { display: grid; place-items: center; width: 16px; height: 16px; font-style: normal; font-size: 12px; line-height: 1; color: var(--navy-soft); }
.msg-in--sinif .msg-hit { right: 40px; bottom: 11px; }
.msg.s1:not(.s2) .msg-in--sinif { animation: msg-acik 1.3s linear both; }
@keyframes msg-acik { 0%, 22% { box-shadow: inset 0 0 0 1.5px #dde2e8; } 28%, 80% { box-shadow: inset 0 0 0 1.5px var(--navy-soft), 0 0 0 3px rgba(29, 79, 134, .15); } 88%, 100% { box-shadow: inset 0 0 0 1.5px #dde2e8; } }
.msg.s1:not(.s2) .msg-hit--sinif .ui-cur { animation: msg-cur-out .62s var(--ui-ease) both; }
.msg.s1:not(.s2) .msg-hit--sinif .msg-rip { animation: msg-rip .5s ease-out .22s both; }

/* sınıf seçicinin açılır paneli (pencere katmanında; sayfa bu adımda kaymaz) */
.msg-pnl { position: absolute; z-index: 22; right: var(--pnlR); top: calc(var(--pad) + var(--bandH) + var(--fldB) + 4px); width: max(var(--fldW), min(256px, var(--cardW) - 2 * var(--cx))); padding: 4px; border-radius: 12px; background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .1), 0 4px 8px rgba(16, 37, 64, .08), 0 22px 40px -16px rgba(16, 37, 64, .45); opacity: 0; translate: 0 -4px; pointer-events: none; }
.msg.s1:not(.s2) .msg-pnl { animation: msg-pnl 1.3s linear both; }
@keyframes msg-pnl { 0%, 24% { opacity: 0; translate: 0 -4px; } 31%, 74% { opacity: 1; translate: 0 0; } 84%, 100% { opacity: 0; translate: 0 -2px; } }
.msg-pnl > span { display: flex; align-items: center; }
/* gerçek liste okul adına göre sıralı 28 şube, kaydırmalı kutu; Ortaokulu en sonda → liste sona kaydırılmış */
.msg-pnl__sb { position: absolute; right: 3px; bottom: 39px; width: 4px; height: 24px; border-radius: 2px; background: #c3c9d2; }
.msg-pnl__s { gap: 6px; height: 28px; margin-bottom: 2px; padding: 0 8px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px #e3e6eb; font-size: 11px; font-weight: 700; color: #8a93a3; }
.msg-pnl__s .msg-i { width: 12px; height: 12px; }
.msg-pnl__g { height: 18px; padding: 2px 8px 0; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); white-space: nowrap; }
.msg-pnl__r { position: relative; gap: 8px; height: 24px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--ink); }
.msg-pnl__r > i { flex: none; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px #c3c9d2; color: #fff; }
.msg-pnl__r > i .msg-i { width: 10px; height: 10px; stroke-width: 3; opacity: 0; }
.msg-pnl__r b { flex: 1; font-weight: 700; }
.msg-pnl__r small { font-size: 10.5px; font-weight: 600; color: var(--mut); }
.msg.s1:not(.s2) .msg-pnl__r--8a { animation: msg-hov 1.3s linear both; }
.msg.s1:not(.s2) .msg-pnl__r--8a > i { animation: msg-chk 1.3s linear both; }
.msg.s1:not(.s2) .msg-pnl__r--8a > i .msg-i { animation: msg-chk-i 1.3s linear both; }
@keyframes msg-hov { 0%, 50% { background: transparent; } 54%, 100% { background: #f1f4f8; } }
@keyframes msg-chk { 0%, 61% { background: #fff; box-shadow: inset 0 0 0 1.5px #c3c9d2; } 64%, 100% { background: var(--navy-soft); box-shadow: inset 0 0 0 1.5px var(--navy-soft); } }
@keyframes msg-chk-i { 0%, 61% { opacity: 0; } 64%, 100% { opacity: 1; } }
.msg-pnl__r--8a .msg-hit { left: 36px; top: 12px; }
.msg.s1:not(.s2) .msg-hit--8a .ui-cur { animation: msg-cur-out .6s var(--ui-ease) .52s both; }
.msg.s1:not(.s2) .msg-hit--8a .msg-rip { animation: msg-rip .5s ease-out .74s both; }
.msg-pnl__f { justify-content: space-between; height: 30px; margin-top: 3px; padding: 3px 2px 0 4px; border-top: 1px solid #eef0f3; }
.msg-pnl__f span { font-size: 10.5px; font-weight: 800; color: #52525b; }
.msg-pnl__f b { display: grid; place-items: center; height: 22px; padding: 0 10px; border-radius: 7px; background: var(--navy-soft); font-size: 10.5px; font-weight: 800; color: #fff; }

/* Mesaj */
.msg-mesaj { padding: 12px var(--cx) 14px; border-top: 1px solid #eef0f3; }
.msg-lbr { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 14px; margin-bottom: 5px; }
.msg-tpls { font-size: 10px; font-weight: 700; color: var(--mut); justify-items: end; white-space: nowrap; }
.msg-tplrow { display: flex; gap: 6px; margin-bottom: 6px; }
.msg-sel { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; height: 32px; padding: 0 28px 0 10px; border-radius: 10px; background: #fff;
  box-shadow: inset 0 0 0 1.5px #cfd5dd; font-size: 11.5px; font-weight: 700; color: var(--ink); transition: box-shadow .25s var(--ui-ease); }
.msg-sel__t { flex: 1; }
.msg-sel__t > * { white-space: nowrap; }
.msg-sel > .msg-chev { position: absolute; right: 9px; top: 9px; width: 14px; height: 14px; color: #6b7280; }
.msg-sel > .msg-hit { right: 46px; bottom: 11px; }
.msg-dd { position: absolute; z-index: 4; left: 0; right: 0; top: 35px; display: flex; flex-direction: column; gap: 1px; padding: 4px; border-radius: 9px; background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .12), 0 3px 6px rgba(16, 37, 64, .08), 0 18px 32px -14px rgba(16, 37, 64, .45); opacity: 0; translate: 0 -3px; }
.msg-dd > span { position: relative; display: flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.msg-dd > span:first-child { color: var(--mut); }
.msg-dd__v .msg-hit { left: 46%; top: 13px; }
.msg.s4:not(.s5) .msg-dd { animation: msg-dd 1.7s linear both; }
@keyframes msg-dd { 0%, 42% { opacity: 0; translate: 0 -3px; } 47%, 80% { opacity: 1; translate: 0 0; } 86%, 100% { opacity: 0; translate: 0 -2px; } }
.msg.s4:not(.s5) .msg-dd__v { animation: msg-ddv 1.7s linear both; }
@keyframes msg-ddv { 0%, 62% { background: transparent; color: var(--ink); } 66%, 100% { background: var(--navy-soft); color: #fff; } }
.msg.s4:not(.s5) .msg-sel { animation: msg-selac 1.7s linear both; }
@keyframes msg-selac { 0%, 40% { box-shadow: inset 0 0 0 1.5px #cfd5dd; } 45%, 84% { box-shadow: inset 0 0 0 1.5px var(--navy-soft), 0 0 0 3px rgba(29, 79, 134, .14); } 90%, 100% { box-shadow: inset 0 0 0 1.5px #cfd5dd; } }
.msg.s4:not(.s5) .msg-hit--tpl .ui-cur { animation: msg-cur-out .6s var(--ui-ease) .48s both; }
.msg.s4:not(.s5) .msg-hit--tpl .msg-rip { animation: msg-rip .5s ease-out .7s both; }
.msg.s4:not(.s5) .msg-hit--opt .ui-cur { animation: msg-cur-out .5s var(--ui-ease) .92s both; }
.msg.s4:not(.s5) .msg-hit--opt .msg-rip { animation: msg-rip .45s ease-out 1.1s both; }
.msg-btns { flex: none; display: flex; gap: 6px; }
.msg-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 32px; padding: 0 10px; border-radius: 10px; background: #fff;
  box-shadow: inset 0 0 0 1.5px #cfd5dd; font-size: 11px; font-weight: 800; color: var(--ink2); opacity: .45; transition: opacity .3s var(--ui-ease) var(--dl), color .3s var(--ui-ease) var(--dl); }
.msg-btn .msg-i { width: 13px; height: 13px; }
.msg-btn--sq { width: 32px; padding: 0; }
.msg.s4:not(.s8) .msg-btn { opacity: 1; }
.msg-btn--uy .msg-hit { right: 18px; bottom: 10px; }
.msg.s5:not(.s6) .msg-btn--uy { animation: msg-push .3s var(--ui-ease) .3s; }
.msg.s5:not(.s6) .msg-hit--uygula .ui-cur { animation: msg-cur-out .75s var(--ui-ease) both; }
.msg.s5:not(.s6) .msg-hit--uygula .msg-rip { animation: msg-rip .5s ease-out .28s both; }
.msg-kis { display: inline-flex; align-items: center; gap: 5px; height: 16px; margin-bottom: 10px; font-size: 10.5px; font-weight: 800; color: var(--navy-soft); white-space: nowrap; }
.msg-kis .msg-i { width: 12px; height: 12px; }
.msg-lb--top { margin-bottom: 5px; }
.msg-inp { display: flex; align-items: center; height: 32px; margin-bottom: 10px; padding: 0 11px; border-radius: 10px; background: #fff;
  box-shadow: inset 0 0 0 1px #cdd3dc, 0 1px 2px rgba(16, 37, 64, .05); font-size: 12px; font-weight: 600; color: var(--ink); }
.msg-inp .msg-x { flex: 1; }
.msg-phd { font-weight: 500; color: #8a93a3; }
.msg-inp { transition: box-shadow .25s var(--ui-ease); }
.msg-f-on { position: relative; line-height: 16px; white-space: nowrap; }
/* yazılan ek: her harf ayrı, bütün olarak belirir (ilk tuş .62 s'de — ipucu ve gönder aynı anda, --dl) */
.msg-typ > span { display: inline-block; vertical-align: top; max-width: 0; overflow: hidden; white-space: pre; }
.msg.s6 .msg-typ > span { max-width: 1em; }
.msg.s6:not(.s7) .msg-typ > span { animation: msg-typ .01s step-end calc(.62s + var(--i) * 85ms) both; }
@keyframes msg-typ { from { max-width: 0; } to { max-width: 1em; } }
.msg-car { display: inline-block; vertical-align: top; width: 1px; height: 15px; margin: 1px 0 0 1px; background: var(--ink); opacity: 0; }
.msg.s6:not(.s7) .msg-car { animation: msg-car 1.4s steps(1, end) both; }
@keyframes msg-car { 0% { opacity: 0; } 26%, 62% { opacity: 1; } 78% { opacity: 0; } 90%, 100% { opacity: 1; } }
.msg.s6:not(.s7) .msg-inp { box-shadow: inset 0 0 0 1.5px var(--navy-soft), 0 0 0 3px rgba(29, 79, 134, .14); transition-delay: .3s; }
.msg-hit--konu { margin: 9px 0 0 2px; }
.msg.s6:not(.s7) .msg-hit--konu .ui-cur { animation: msg-cur-out .7s var(--ui-ease) both; }
.msg.s6:not(.s7) .msg-hit--konu .msg-rip { animation: msg-rip .5s ease-out .26s both; }
.msg-ed { border-radius: 9px; background: #fff; box-shadow: inset 0 0 0 1px #d6dbe2; overflow: hidden; }
.msg-tb { display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 9px; color: #3f4756; box-shadow: inset 0 -1px 0 #eceff3, 0 1px 3px rgba(16, 37, 64, .05); }
.msg-tb .msg-i { width: 13px; height: 13px; stroke-width: 2; }
.msg-tb__p { display: inline-flex; align-items: center; gap: 8px; height: 20px; padding: 0 5px 0 7px; border-radius: 5px; background: #f4f5f7; font-size: 10.5px; font-weight: 600; color: #3f4756; }
.msg-tb__p .msg-i { width: 11px; height: 11px; }
.msg-tb__a { position: relative; display: grid; place-items: center; width: 14px; height: 16px; font-size: 12px; font-weight: 800; line-height: 1; color: #3f4756; }
.msg-tb__a i { position: absolute; left: 1px; right: 1px; bottom: 0; height: 2px; border-radius: 1px; background: #1f2633; }
.msg-tb__fc { display: inline-flex; align-items: center; gap: 1px; }
.msg-tb .msg-tb__fc .msg-i { width: 9px; height: 9px; stroke-width: 2.4; color: #6b7280; }
/* dar görünüm araç çubuğu (uygulama < 1024 px: bold italic | bullist numlist | link) — yalnız ≤ 600 kapta; __g grup başı */
.msg-tb .msg-tb__m { display: none; }
.msg-tb .msg-tb__g { margin-left: 5px; }
.msg-ed__c { height: var(--edH); padding: 8px 10px; font-size: 11px; font-weight: 500; line-height: 15px; color: #1f2633; }
.msg-par { display: block; margin-bottom: 6px; opacity: 0; translate: 0 4px; transition: opacity .3s var(--ui-ease), translate .4s var(--ui-ease); transition-delay: calc(.5s + var(--i) * 120ms); }
.msg.s5:not(.s8) .msg-par { opacity: 1; translate: 0 0; }
.msg-note { margin-top: 5px; font-size: 10px; font-weight: 600; line-height: 13px; color: var(--mut); }
.msg-ek { margin-top: 10px; opacity: 0; transition: opacity .3s var(--ui-ease) var(--dl); }
.msg.s3:not(.s8) .msg-ek { opacity: 1; }
.msg-file { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 4px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px #cfd5dd; font-size: 11px; font-weight: 700; color: var(--ink2); }
.msg-file span { display: grid; place-items: center; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--navy-soft); font-size: 10.5px; font-weight: 800; color: #fff; }

/* sayfa kayar: Mesaj bölümü (s4), dar kapta konu + içerik (s5) */
.msg.s4:not(.s8) .msg-scr { translate: 0 calc(-1 * var(--sc4)); }
.msg.s5:not(.s8) .msg-scr { translate: 0 calc(-1 * var(--sc5)); transition-delay: .55s; }

/* ── sağ: gönderim özeti ── */
.msg-side { position: relative; z-index: 2; display: flex; flex-direction: column; min-width: 0; border-radius: 14px; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 1px var(--ui-line), 0 1px 2px rgba(16, 37, 64, .05), 0 14px 30px -22px rgba(16, 37, 64, .45); }
.msg-sec { padding: 10px 12px; }
.msg-sec + .msg-sec { border-top: 1px solid #eef0f3; }
.msg-sh { display: flex; align-items: center; gap: 6px; height: 16px; }
.msg-sh__l { font-size: 10px; font-weight: 800; letter-spacing: .05em; line-height: 13px; text-transform: uppercase; color: var(--navy-soft); white-space: nowrap; }
.msg-sh__l--g { display: block; color: #5d6676; }
.msg-term { display: inline-flex; align-items: center; gap: 3px; height: 16px; padding: 0 6px; border-radius: 999px; background: rgba(29, 79, 134, .12); font-size: 10px; font-weight: 800; color: var(--navy-soft); }
.msg-term .msg-i { width: 10px; height: 10px; }
.msg-cnt { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 4px; margin-top: 3px; }
.msg-cnt__n { font-size: 24px; font-weight: 900; line-height: 28px; letter-spacing: -.02em; color: #0f2a4d; }
.msg-cnt > span:not(.msg-chip) { font-size: 12px; font-weight: 800; color: #0f2a4d; }
.msg-chip { flex: 0 0 100%; margin-top: 4px; }
.msg-chip > * { justify-self: start; display: inline-flex; align-items: center; height: 18px; padding: 0 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; color: #fff; white-space: nowrap; }
.msg-chip--all { background: var(--navy-soft); }
.msg-chip--sb { background: #10b981; }
.msg-desc { display: flex; align-items: flex-start; gap: 5px; min-height: 34px; margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(29, 79, 134, .16); font-size: 10.5px; font-weight: 700; line-height: 14px; color: #163e6a; }
.msg-desc .msg-i { width: 12px; height: 12px; margin-top: 1px; }
.msg-desc .msg-x { flex: 1; }
.msg-rst { margin-top: 1px; height: 13px; font-size: 10px; font-weight: 700; line-height: 13px; color: var(--mut); }
.msg-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.msg-cd { display: block; height: 53px; padding: 4px 8px 5px; border-radius: 10px; background: #f7f8fa; box-shadow: inset 0 0 0 1.5px #e2e5ea; opacity: .6;
  transition: opacity .3s var(--ui-ease) var(--dl), background-color .3s var(--ui-ease) var(--dl), box-shadow .3s var(--ui-ease) var(--dl); }
.msg-cd__l { display: flex; align-items: center; gap: 4px; height: 13px; font-size: 10.5px; font-weight: 800; color: #4c5566; white-space: nowrap; }
.msg-cd__l .msg-i { width: 12px; height: 12px; }
.msg-cd__v { display: flex; align-items: baseline; gap: 3px; height: 21px; margin-top: 1px; }
.msg-cd__v .msg-n { font-size: 17px; font-weight: 900; line-height: 21px; letter-spacing: -.01em; color: #111827; }
.msg-cd__v small { font-size: 10px; font-weight: 800; color: var(--mut); }
.msg-cd__s { height: 12px; font-size: 10px; font-weight: 700; line-height: 12px; color: var(--mut); white-space: nowrap; }
/* seçili kanal vurgulanır; ulaşılabilir 0 ise kırmızı (s0–s1 E-posta), değilse kurum rengi */
.msg:not(.s2) .msg-cd--em, .msg.s8 .msg-cd--em { opacity: 1; background: #fef2f2; box-shadow: inset 0 0 0 1.5px #f87171; }
.msg.s2:not(.s3) .msg-cd--em, .msg.s3:not(.s8) .msg-cd--in { opacity: 1; background: #eef4fb; box-shadow: inset 0 0 0 1.5px var(--navy-soft); }
.msg-warn { margin-top: 6px; min-height: 39px; font-size: 10px; font-weight: 700; line-height: 13px; }
.msg-warn > span { display: flex; align-items: flex-start; gap: 5px; }
.msg-warn .msg-i { width: 12px; height: 12px; margin-top: 1px; }
.msg-w--bad { color: var(--bad); } .msg-w--warn { color: var(--amb); }
.msg-ul { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 28px; }
.msg-ul > span:first-child { font-size: 11.5px; font-weight: 700; color: #4c5566; white-space: nowrap; }
.msg-ul__v { display: inline-flex; align-items: baseline; gap: 3px; }
.msg-ul__v .msg-n { font-size: 22px; font-weight: 900; line-height: 26px; letter-spacing: -.02em; color: var(--navy-soft); }
.msg-ul__v small { font-size: 10px; font-weight: 700; color: var(--mut); }
.msg-hint { height: 14px; margin-top: 4px; font-size: 10.5px; font-weight: 700; line-height: 14px; color: var(--amb); justify-items: center; text-align: center; }
.msg-send { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; height: 34px; margin-top: 6px; border-radius: 10px; font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--navy-soft), var(--navy)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(16, 37, 64, .2), 0 8px 16px -10px rgba(20, 61, 107, .8);
  opacity: .42; transition: opacity .3s var(--ui-ease) var(--dl); }
.msg-send .msg-i { width: 14px; height: 14px; }
.msg.s6:not(.s8) .msg-send { opacity: 1; }
.msg-send .msg-hit { right: 30%; bottom: 10px; }
.msg.s7:not(.s8) .msg-send { animation: msg-push .3s var(--ui-ease) .3s; }
.msg.s7:not(.s8) .msg-hit--send .ui-cur { animation: msg-cur-out .75s var(--ui-ease) both; }
.msg.s7:not(.s8) .msg-hit--send .msg-rip { animation: msg-rip .5s ease-out .3s both; }

/* ── onay penceresi (appConfirm · SweetAlert) ── */
.msg-dlg { position: absolute; z-index: 24; inset: 0; display: grid; place-items: center; padding: 0 16px; background: rgba(15, 23, 42, .4); opacity: 0;
  transition: opacity .3s var(--ui-ease); pointer-events: none; }
.msg-dlg__c { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 288px; padding: 18px 18px 16px; border-radius: 10px; background: #fff; text-align: center;
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .06), 0 2px 4px rgba(0, 0, 0, .08), 0 26px 46px -18px rgba(0, 0, 0, .55); scale: .9; transition: scale .5s var(--spring); }
.msg-q { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 0 0 3px #c9dae1; font-size: 27px; font-weight: 600; line-height: 1; color: #87adbd; }
.msg-dlg__c > b { margin-top: 12px; font-size: 15px; font-weight: 800; line-height: 20px; color: #18181b; }
.msg-dlg__t { margin-top: 6px; font-size: 11.5px; font-weight: 500; line-height: 16px; color: #545454; text-wrap: balance; }
.msg-dlg__b { display: flex; gap: 8px; margin-top: 14px; }
.msg-dlg__b > span { position: relative; display: grid; place-items: center; height: 30px; padding: 0 14px; border-radius: 6px; font-size: 12px; font-weight: 600; color: #fff; }
.msg-dlg__no { background: #71717a; }
.msg-dlg__ok { background: var(--navy-soft); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.msg-dlg__ok .msg-hit { left: 62%; top: 17px; }
.msg.s7:not(.s8) .msg-dlg { opacity: 1; transition-delay: .48s; }
.msg.s7:not(.s8) .msg-dlg__c { scale: 1; transition-delay: .48s; }
.msg.s8 .msg-dlg { transition-delay: .42s; }
.msg.s8:not(.s9) .msg-dlg__ok { animation: msg-push .3s var(--ui-ease) .26s; }
.msg.s8:not(.s9) .msg-hit--ok .ui-cur { animation: msg-cur-out .7s var(--ui-ease) both; }
.msg.s8:not(.s9) .msg-hit--ok .msg-rip { animation: msg-rip .5s ease-out .26s both; }

/* ── s7: sayfa yeniden yüklenir — başta ileti + rapor, form ilk hâlinde ── */
.msg.s8 .msg-page { translate: 0 0; transition-delay: .5s; }
.msg.s8 .msg-res { opacity: 1; transition-delay: .62s; }
.msg.s8 .msg-grid { animation: msg-yukle .7s var(--ui-ease) .44s both; }
@keyframes msg-yukle { 0%, 100% { opacity: 1; } 35% { opacity: .35; } }
.msg.s8 .msg-scr { transition-duration: 0s; transition-delay: .62s; }

/* ── velinin telefonu ── */
.msg-ph { position: absolute; z-index: 30; right: 24px; top: 20px; width: 214px; height: 432px; opacity: 0; translate: 0 46px; pointer-events: none;
  transition: opacity .4s var(--ui-ease), translate .75s cubic-bezier(.3, 1.2, .45, 1); }
.msg-ph__f { position: relative; width: 100%; height: 100%; }
.msg.s9 .msg-ph { opacity: 1; translate: 0 0; transition-delay: .1s; }
.msg.s9 .msg-win::after { opacity: 1; transition-delay: .1s; }
.msg-ph__tag { position: absolute; z-index: 2; right: calc(100% + 10px); bottom: 74px; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px 0 6px; border-radius: 999px;
  background: var(--sun); color: var(--sun-ink, #2a1c00); font-size: 10px; font-weight: 800; white-space: nowrap; rotate: -3deg;
  box-shadow: 0 0 0 1.5px #fff, 0 4px 10px -4px rgba(16, 37, 64, .45); opacity: 0; scale: .7; transition: opacity .3s var(--ui-ease), scale .45s var(--spring); }
.msg-ph__tag .msg-i { width: 11px; height: 11px; stroke-width: 2.4; }
.msg.s9 .msg-ph__tag { opacity: 1; scale: 1; transition-delay: 1.05s; }
/* durum çubuğu */
.msg-psb { position: absolute; z-index: 3; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; height: 26px; padding: 0 13px 0 19px; color: #0b1526; }
.msg-psb > b { min-width: 1px; font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.msg-psb--l { color: #fff; }
.msg-isl { position: absolute; left: 50%; top: 6px; width: 54px; height: 15px; margin-left: -27px; border-radius: 999px; background: #05070b; }
.msg-sbi { display: flex; align-items: center; gap: 3px; }
.msg-sbi svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.msg-sbi .msg-bat { width: 16px; height: 12px; }
.msg-home { position: absolute; z-index: 3; left: 50%; bottom: 6px; width: 70px; height: 4px; margin-left: -35px; border-radius: 3px; background: rgba(255, 255, 255, .85); }
.msg-home--d { background: rgba(11, 21, 38, .85); }
/* kilit ekranı */
.msg-lock { position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(120% 70% at 85% 8%, rgba(255, 182, 39, .28), rgba(255, 182, 39, 0) 55%), radial-gradient(90% 60% at 0% 100%, rgba(44, 110, 180, .55), rgba(44, 110, 180, 0) 60%),
              linear-gradient(165deg, #0d2747 0%, var(--navy) 48%, #1d4f86 100%); transition: opacity .35s var(--ui-ease), scale .5s var(--ui-ease); }
.msg-lock__d { position: absolute; left: 0; right: 0; top: 42px; text-align: center; font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .86); }
.msg-lock__t { position: absolute; left: 0; right: 0; top: 56px; text-align: center; font-size: 50px; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.msg-pn { position: absolute; left: 9px; right: 9px; top: 132px; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; padding: 9px 10px 10px 9px; border-radius: 15px;
  background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 2px 4px rgba(6, 18, 36, .12), 0 18px 34px -14px rgba(6, 18, 36, .7);
  opacity: 0; translate: 0 -16px; scale: .96; transition: opacity .3s var(--ui-ease), translate .7s cubic-bezier(.34, 1.4, .64, 1), scale .5s var(--ui-ease); }
.msg-pn img { width: 24px; height: 24px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(16, 37, 64, .08); }
.msg-pn__b { display: block; min-width: 0; }
.msg-pn__h { display: flex; align-items: baseline; gap: 6px; }
.msg-pn__h b { flex: 1; min-width: 0; font-size: 11px; font-weight: 800; color: #10151f; white-space: nowrap; }
.msg-pn__h em { flex: none; font-style: normal; font-size: 10px; font-weight: 600; color: #6b7280; }
/* bildirim gövdesi = mesajın ilk 160 karakteri; işletim sistemi kilit ekranında üç satırda keser */
.msg-pn__m { display: -webkit-box; margin-top: 1px; font-size: 10.5px; font-weight: 500; line-height: 14px; color: #2b3240; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.msg.s9 .msg-pn { opacity: 1; translate: 0 0; scale: 1; transition-delay: .78s; }
.msg-lock__k { position: absolute; left: 22px; right: 22px; bottom: 26px; display: flex; justify-content: space-between; }
.msg-lock__k i { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.msg-touch { position: absolute; z-index: 4; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .8), rgba(226, 233, 243, .55) 70%);
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .3), 0 2px 5px rgba(16, 37, 64, .25), 0 10px 18px -8px rgba(16, 37, 64, .45); }
.msg-touch i { position: absolute; inset: -1px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .95); box-shadow: 0 0 0 1px rgba(16, 37, 64, .28); opacity: 0; }
.msg.s10 .msg-touch { animation: msg-dokun .7s var(--ui-ease) both; }
.msg.s10 .msg-touch i { animation: msg-dalga .5s ease-out .2s both; }
.msg.s10 .msg-pn { scale: .97; transition-delay: .2s; }
@keyframes msg-dokun { 0% { opacity: 0; translate: 10px 14px; } 30% { opacity: 1; translate: 0 0; scale: 1; } 45% { scale: .76; } 62% { scale: 1; opacity: 1; } 100% { opacity: 0; } }
@keyframes msg-dalga { 0% { opacity: .95; scale: .7; } 100% { opacity: 0; scale: 2.3; } }
.msg.s10 .msg-lock { opacity: 0; scale: 1.04; transition-delay: .5s; }
/* portal: mesaj ayrıntısı (/portal/message) */
.msg-app { position: absolute; inset: 0; background: #f6f7fb; opacity: 0; scale: .9; transition: opacity .35s var(--ui-ease), scale .55s var(--ui-ease); }
.msg.s10 .msg-app { opacity: 1; scale: 1; transition-delay: .45s; }
.msg-ah { position: absolute; left: 0; right: 0; top: 26px; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; }
.msg-ah__b { width: 15px; height: 15px; color: #1f2633; }
.msg .msg-logo { flex: none; width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7), 0 2px 5px -1px rgba(16, 37, 64, .4); }
.msg-ah__s { flex: 1; }
.msg-ah__bell { position: relative; display: grid; place-items: center; width: 24px; height: 24px; color: #2b3240; }
.msg-ah__bell .msg-i { width: 15px; height: 15px; }
.msg-ah__bell::after { content: ""; position: absolute; top: 3px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 1.5px #f6f7fb; }
.msg-ah__av { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px #e4e7ec, 0 1px 2px rgba(16, 37, 64, .08);
  font-size: 12px; font-weight: 800; color: var(--navy-soft); }
.msg-kids { position: absolute; left: 10px; right: 10px; top: 66px; display: flex; gap: 5px; }
.msg-kids > span { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 4px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #e4e7ec;
  font-size: 11px; font-weight: 800; color: #3f4756; }
.msg-kids i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--navy-soft); }
.msg-kids .msg-on { background: var(--navy); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); color: #fff; }
.msg-kids .msg-on i { background: rgba(255, 255, 255, .2); color: #fff; }
.msg-at { position: absolute; left: 12px; right: 12px; top: 102px; font-size: 15px; font-weight: 800; line-height: 20px; letter-spacing: -.01em; color: #111827; }
.msg-mc { position: absolute; left: 10px; right: 10px; top: 130px; padding: 10px 12px 6px; border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 37, 64, .06), 0 1px 2px rgba(16, 37, 64, .05), 0 10px 22px -16px rgba(16, 37, 64, .3), inset 0 1px 0 rgba(255, 255, 255, .6); }
.msg-mc__k { display: block; margin-bottom: 4px; font-size: 10px; font-weight: 700; color: var(--mut); }
.msg-mc__p { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; line-height: 16px; color: #27272a;
  opacity: 0; translate: 0 5px; transition: opacity .3s var(--ui-ease), translate .4s var(--ui-ease); transition-delay: calc(.75s + var(--i) * 110ms); }
.msg.s10 .msg-mc__p { opacity: 1; translate: 0 0; }
/* gerçek alt çubuk: beş sekmenin hepsi adlı, içerik genişliğinde, aralar eşit dağılır (justify-around) */
.msg-tbar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; height: 50px; padding: 4px 2px 12px; background: #fff;
  box-shadow: inset 0 1px 0 rgba(16, 37, 64, .08), 0 -6px 14px -10px rgba(16, 37, 64, .25); }
.msg-tbar > * { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 3px; border-radius: 10px;
  color: #5b6475; font-size: 10px; font-weight: 600; line-height: 12px; white-space: nowrap; }
.msg-tbar .msg-i { width: 15px; height: 15px; }
.msg-tbar > b { padding: 0 6px; font-weight: 700; color: #fff; background: var(--navy); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 4px 10px -6px rgba(16, 37, 64, .7); }
.msg-tbar em { position: absolute; top: 1px; right: 1px; display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; background: #dc2626;
  box-shadow: 0 0 0 1.5px #fff; font-style: normal; font-size: 10px; font-weight: 800; line-height: 1; color: #fff; }

/* ══ ORTA (≤ 675): sekme yazısı biraz küçülür, «Gönderilecek» düğmelerinin simgesi kalkar («Tüm yakınlar» aynı satıra sığar),
   şablon seçici tam satır olur, düğmeler alta iner (sitede 1280+ görünümde kap 667: «Tüm yakınlar» ve şablon adı taşıyordu) ══ */
@container (max-width: 675px) {
  .msg-tab { font-size: 11px; padding: 0 8px; }
  .msg-seg--hedef > span .msg-i { display: none; }
  .msg-tplrow { flex-wrap: wrap; }
  .msg-sel { flex: 1 1 100%; }
}
/* 601–675 iki sütun: alta inen düğme satırı formu iter — seçici + düğmeler 30 px, satır arası 4 px (s0–s3 «Kişiselleştir»
   kartın içinde biter); s4–s7 kaydırma eklenen satır kadar fazla (altta «Dosya ekleri» tam, kutusu kenarda) */
@container (600px < width <= 675px) {
  .msg-win { --sc4: 300px; }
  .msg-tplrow { row-gap: 4px; }
  .msg-sel, .msg-btn { height: 30px; }
  .msg-btn--sq { width: 30px; }
  .msg-sel > .msg-chev { top: 8px; }
  .msg-dd { top: 33px; }
}
/* 601–626 (sitede 1180 görünüm = 618): kart daha dar — «Tüm yakınlar» simgesiz, «Gönderilecek» düğmeleri biraz sıkı */
@container (600px < width <= 626px) {
  .msg-yak > .msg-i:first-child { display: none; }
  .msg-seg--hedef > span { padding: 0 7px; }
}

/* ══ DAR (≤ 600): tek sütun; özet kartı pencerenin altına sabitlenir (telefonda formun altında akar) ══ */
@container (max-width: 600px) {
  .msg-win { --H: 480px; --dockH: 165px; --cardW: calc(100cqw - 2px - 2 * var(--pad)); --pnlR: calc(var(--pad) + var(--cx)); --sc4: 298px; --sc5: 394px; --rh: 104px; }
  .msg-note { margin-top: 1px; }
  .msg-tb .msg-tb__d { display: none; }
  .msg-tb .msg-tb__m { display: block; }
  .msg-grid { grid-template-columns: minmax(0, 1fr); }
  .msg-side { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 14px 26px auto 32px;
    column-gap: 10px; row-gap: 6px; height: var(--dockH); padding: 10px 12px; align-content: start;
    box-shadow: 0 0 0 1px var(--ui-line), 0 -10px 24px -14px rgba(16, 37, 64, .45), 0 1px 2px rgba(16, 37, 64, .05); transition: translate .5s var(--ui-ease), opacity .4s var(--ui-ease); }
  .msg-sec { display: contents; }
  .msg-sh { grid-column: 1; grid-row: 1; height: 14px; }
  .msg-term, .msg-desc, .msg-rh, .msg-warn { display: none; }
  .msg-cnt { grid-column: 1; grid-row: 2; flex-wrap: nowrap; align-items: center; margin-top: 0; height: 26px; }
  .msg-cnt__n { font-size: 20px; line-height: 26px; }
  .msg-chip { flex: none; margin: 0 0 0 4px; }
  .msg-ul { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; justify-content: center; gap: 0; height: 46px; }
  .msg-ul > span:first-child { font-size: 10.5px; font-weight: 700; color: #4c5566; }
  .msg-ul__v .msg-n { font-size: 20px; line-height: 26px; }
  .msg-cards { grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 2px; }
  .msg-cd { height: 53px; padding: 4px 7px; }
  .msg-cd__v { height: 19px; }
  .msg-cd__v .msg-n { font-size: 16px; line-height: 19px; }
  .msg-hint { grid-column: 1; grid-row: 4; align-self: center; margin: 0; justify-items: start; text-align: left; }
  .msg-send { grid-column: 2; grid-row: 4; height: 32px; margin: 0; padding: 0 14px; }
  .msg.s8 .msg-side { opacity: 0; translate: 0 30px; transition-delay: .45s; }
  .msg-card::after { display: none; }
  .msg-ph { right: 18px; top: 24px; }
  .msg-win::after { background: rgba(11, 28, 51, .34); }
  .msg-ph__tag { display: none; }
}
@container (max-width: 470px) {
  .msg-win { --cx: 12px; --sc4: 296px; }
  .msg-tab { font-size: 11px; padding: 0 8px; }
  .msg-tab .msg-i { display: none; }
  .msg-dd > span { font-size: 10.5px; }
}
/* en dar (telefon ~330): kitle seçimi ve «Tüm yakınlar» gizlenir, şablon düğmeleri alt satıra iner, kanal kutuları 2 × 2 */
@container (max-width: 400px) {
  .msg-win { --kimeH: 162px; --fldB: 148px; --dockH: 190px; --sc4: 258px; --sc5: 393px; --edH: 122px; --rh: 120px; }
  .msg-seg--kitle, .msg-yak { display: none; }
  .msg-flds { gap: 10px; }
  .msg-in { padding: 0 9px; font-size: 11.5px; }
  .msg-tplrow { flex-wrap: wrap; }
  .msg-sel { flex: 1 1 100%; }
  .msg-kis { margin-top: 2px; }
  .msg-note { margin-top: 5px; }
  .msg-side { grid-template-rows: 14px 26px auto 32px; }
  .msg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msg-cd { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 4px; height: 38px; padding: 4px 8px; }
  .msg-cd__l { grid-column: 1; grid-row: 1; }
  .msg-cd__l .msg-i { display: none; }
  .msg-cd__v { grid-column: 2; grid-row: 1 / span 2; height: auto; margin: 0; }
  .msg-cd__s { grid-column: 1; grid-row: 2; }
  .msg-send { padding: 0 12px; }
  .msg-flash { padding: 8px 11px; }
  .msg-ph { left: 50%; right: auto; margin-left: -107px; }
}
