/* ==========================================================================
   NG Kütahya · çini tasarım dili
   Kobalt mavisi, porselen beyazı ve lacivert; vurgu olarak Kütahya çinisinin turkuazı ve mercan kırmızısı.
   Diğer bütün stillerin üzerine yazar (en son yüklenir). Renkler değişkenlerden geldiği için Pano, Analiz ve
   Yönetim de aynı paleti alır; sohbet ve giriş ekranının dekoru (çini karo deseni, fener) yalnız burada.
   Performans kuralı: sürekli çalışan animasyon yalnız transform/opacity ile; bulanıklık (backdrop-filter),
   karışım modu ve SVG filtresi kullanılmaz; parıltılar bir kez geçer.
   ========================================================================== */

/* ---------- Palet ---------- */
:root {
  --lacivert-1: #0d2b60; --lacivert-2: #0a2150; --lacivert-3: #06183c; --lacivert-4: #041030;
  --kobalt: #1f4fa8; --kobalt-2: #2a62c9; --kobalt-acik: #86acff; --gok: #dbe7fb;
  --turkuaz: #1aa0a8; --mercan: #c8463d; --altin: #c9a25a;
  --govde-yazi: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --ink: #10224a; --muted: #5d6b88;
  --anthracite: #10224a; --anthracite-2: #1f4fa8;
  --isik-rgb: 31, 79, 168;
  --cobalt: #1f4fa8; --cobalt-soft: rgba(31, 79, 168, .10);
  --accent: #12317a; --accent-2: #1f4fa8; --accent-ink: #ffffff;
  --vurgu: rgba(31, 79, 168, .10); --vurgu-2: rgba(31, 79, 168, .18); --vurgu-ink: #163f91;
  --hover: rgba(31, 79, 168, .08); --hover-cizgi: rgba(31, 79, 168, .25); --hover-yazi: #163f91;
  --glass: rgba(255, 255, 255, .78); --glass-strong: #ffffff; --glass-border: rgba(31, 79, 168, .12);
  --hairline: rgba(16, 34, 74, .09);
  --shadow: 0 1px 2px rgba(16, 34, 74, .05), 0 14px 34px -22px rgba(16, 34, 74, .35);
  --page-bg: #eef3fb; --bg-1: #f4f8fe; --bg-2: #e3ecf8;
  --kart-bg: rgba(255, 255, 255, .80); --kart-cizgi: rgba(31, 79, 168, .13); --kart-dugme: rgba(31, 79, 168, .06);
  --kart-baslik: #10224a; --kart-metin: #5d6b88;
  --surface: #ffffff; --surface-hover: #f2f6fd; --sidebar-bg: var(--lacivert-2);
  --chip-bg: rgba(31, 79, 168, .07);
  --acc-1: #1f4fa8; --acc-1-soft: rgba(31, 79, 168, .10);

  /* Pano / Analiz / Yönetim */
  --p-zemin: linear-gradient(160deg, #f5f8fd 0%, #edf3fb 50%, #e4ecf8 100%);
  --p-yan: var(--lacivert-2);
  --panel-golge: 8px 0 34px -14px rgba(6, 24, 60, .55);
  --ust-golge: transparent;
  --p-iskelet: #e3ebf7; --p-isilti: rgba(255, 255, 255, .75);
  --p-bg: #eef3fb; --p-card: #ffffff; --p-border: #dbe5f3; --p-line: #e6edf7; --p-soft: #f2f6fd;
  --p-ink: #10224a; --p-muted: #56658a; --p-faint: #5f6f91;   /* soluk yazı beyaz zeminde 5:1 (eskisi 3,5:1 kalıyordu) */
  --p-accent: #1f4fa8; --p-accent-soft: rgba(31, 79, 168, .10); --p-chip: #e6eef9;
  --kutu-golge: rgba(16, 34, 74, .10); --kutu-isik: rgba(31, 79, 168, .05);
  --dur-zemin: rgba(200, 70, 61, .14); --dur-zemin-2: rgba(200, 70, 61, .24); --dur-cizgi: rgba(200, 70, 61, .45); --dur-ink: #a3322b;


  /* Sohbet zemini */
  --sohbet-zemin:
    radial-gradient(900px 520px at 78% 4%, rgba(255, 255, 255, .95), transparent 62%),
    radial-gradient(700px 600px at 12% 100%, rgba(150, 175, 220, .22), transparent 70%),
    linear-gradient(160deg, #f6f9fe 0%, #eaf1fb 52%, #dde8f7 100%);
}

:root[data-theme="dark"] {
  /* Gece mavisi (mürekkep mavisi): eski doygun lacivert yerine az doygun, derin bir zemin; yüzeyler kademeli
     açılır, vurgular parlak gök mavisi. Zemin dokusu ADRIA taşının gece mavisi hali (ng/tas-gece.webp). */
  --gece-0: #070b14; --gece-1: #0b111d; --yuzey-1: #111a2a; --yuzey-2: #172236; --yuzey-3: #1d2a42; --gok: #7aa5ff;
  --ink: #e6ecf6; --muted: #95a3bd;
  --anthracite: #e6ecf6; --anthracite-2: var(--gok);
  --isik-rgb: 122, 165, 255;
  --cobalt: var(--gok); --cobalt-soft: rgba(122, 165, 255, .14);
  --accent: #3f74e8; --accent-2: #5585f0; --accent-ink: #ffffff;
  --vurgu: rgba(122, 165, 255, .16); --vurgu-2: rgba(122, 165, 255, .26); --vurgu-ink: #b9cfff;
  --hover: rgba(122, 165, 255, .10); --hover-cizgi: rgba(150, 175, 220, .32); --hover-yazi: #d3e1ff;
  --glass: rgba(17, 26, 42, .78); --glass-strong: var(--yuzey-1); --glass-border: rgba(150, 175, 220, .13);
  --hairline: rgba(150, 175, 220, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 18px 40px -24px rgba(0, 0, 0, .8);
  --page-bg: var(--gece-1); --bg-1: #0d1422; --bg-2: var(--gece-0);
  --kart-bg: rgba(17, 26, 42, .9); --kart-cizgi: rgba(150, 175, 220, .14); --kart-dugme: rgba(150, 175, 220, .07);
  --kart-baslik: #ffffff; --kart-metin: #aab6cc;
  --surface: var(--yuzey-1); --surface-hover: var(--yuzey-2); --sidebar-bg: var(--gece-0);
  --chip-bg: rgba(150, 175, 220, .08);
  --acc-1: var(--gok); --acc-1-soft: rgba(122, 165, 255, .14);

  --p-zemin: linear-gradient(160deg, #0d1422 0%, #0a101b 55%, #070b14 100%);
  --p-yan: var(--gece-0);
  --panel-golge: 8px 0 34px -14px rgba(0, 0, 0, .85);
  --p-iskelet: var(--yuzey-3); --p-isilti: rgba(255, 255, 255, .05);
  --p-bg: var(--gece-1); --p-card: var(--yuzey-1); --p-border: rgba(150, 175, 220, .14); --p-line: rgba(150, 175, 220, .09);
  --p-soft: #0f1726; --p-ink: #e6ecf6; --p-muted: #a3afc5; --p-faint: #7b8aa6;
  --p-accent: var(--gok); --p-accent-soft: rgba(122, 165, 255, .16); --p-chip: var(--yuzey-3);
  --kutu-golge: rgba(0, 0, 0, .4); --kutu-isik: rgba(122, 165, 255, .06);
  --dur-zemin: rgba(240, 120, 110, .2); --dur-zemin-2: rgba(240, 120, 110, .32); --dur-cizgi: rgba(240, 120, 110, .5); --dur-ink: #ffb4ad;

  --sohbet-zemin:
    radial-gradient(900px 560px at 82% 0%, rgba(63, 116, 232, .14), transparent 62%),
    linear-gradient(160deg, #0d1422 0%, #0a101b 55%, #070b14 100%);
}
/* Tema geçişi düğmesinin üzerindeki eski filtreler (siyah logoyu beyaza çeviriyordu) */
:root[data-theme="dark"] .brand .mark img { filter: none; }

body { font-family: var(--govde-yazi); letter-spacing: -.005em; }
/* Panoda yer yer dolaşan ışık: bordo yerine çini renkleri */
@keyframes lekeRenk {
  0%, 100% { --leke-renk: #1f4fa8; } 20% { --leke-renk: #2a62c9; } 40% { --leke-renk: #1aa0a8; }
  60% { --leke-renk: #86acff; } 80% { --leke-renk: #c9a25a; } }
.card h3, .welcome h2 { --parilti-isik: #6f9bff; }
:root[data-theme="dark"] :is(.card h3) { --parilti-isik: #bcd2ff; }

/* ---------- Logo ----------
   Beyaz, harf sınırına kırpılmış ve ekrandaki boyutun ~3 katına yüksek kaliteyle küçültülmüş hazır görseller
   (ng/ng-beyaz.png, kutahya-beyaz.png; giriş ekranında açık zemin için logo-lacivert.png). Eskiden tam boy logo maske olarak 6-8 kat küçültülüyor,
   kenarları tırtıklı çıkıyordu. NG rozetleri ve kenar panel lacivert zeminde (beyaz), giriş ekranı açık zeminde (lacivert). */
.ng-mono { display: block; aspect-ratio: 264 / 172; background: url(/static/ng/ng-beyaz.png) center / contain no-repeat; }
.ng-logo { display: block; width: 300px; aspect-ratio: 1080 / 73; background: url(/static/ng/logo-lacivert.png) left center / contain no-repeat; }
/* Kenar panelde üst üste NG ve KÜTAHYA, ince çerçeveli bir plakanın içinde: hafif cam zemin, beyaz kenar,
   içte altın kıl çizgisi (outline), yumuşak gölge */
.ng-logo.dikey { width: auto; aspect-ratio: auto; background: none; display: flex; flex-direction: column; align-items: center;
  gap: 9px; padding: 16px 26px 15px; border-radius: 18px; position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .025) 60%);
  border: 1px solid rgba(255, 255, 255, .16); outline: 1px solid rgba(201, 162, 90, .38); outline-offset: -6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 16px 34px -18px rgba(0, 0, 0, .7); }
.ng-logo.dikey::before { content: ""; width: 66px; aspect-ratio: 264 / 172; opacity: .96;
  background: url(/static/ng/ng-beyaz.png) center / contain no-repeat; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.ng-logo.dikey::after { content: ""; width: 132px; aspect-ratio: 540 / 44; opacity: .9;
  background: url(/static/ng/kutahya-beyaz.png) center / contain no-repeat; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }

/* ==========================================================================
   Çerçeve: lacivert kenar panel, porselen zemin
   ========================================================================== */
.shell { background: transparent; }
.shell { --yan-gen: 284px; }
.main { position: relative; overflow: hidden; }
.shell:not(.pano-mode) .main { background: var(--sohbet-zemin); }
.main > :not(.cini-zemin) { position: relative; z-index: 1; }
/* Üst bar sohbet alanının üstünde kalmalı: hesap menüsü aşağı açılıyor; aynı katmanda olunca sonra gelen sohbet
   alanı menünün üstüne çıkıyor, "Oturumu kapat"a tıklanamıyordu */
.main > .topbar { z-index: 5; }

/* ---------- Zemin: NG Kütahya mermeri, mavi tonlarda ----------
   Açık tema: ng/mermer-acik.webp, ürünün (ALBATROS 55015783R) dört fotoğrafı 2x2 yan yana, birleşim
   yerleri yumuşak geçişle kaynaşmış, 2100 px (büyük ekranda gerilip bulanıklaşmaz); mavi ton görsele işlenmiş,
   tarayıcıda filtre yok. Koyu tema: ng/tas-gece.webp (ADRIA doğal taş 55016166R, gece mavisi).
   Yalnız açık olan temanın görseli indirilir.
   Hareketler göze batmaz: mermer 70 sn'de çok az kayar, üstünden ara sıra silik bir ışık süzülür. Hepsi kendi
   katmanında transform ile, sayfa yeniden boyanmaz. */
:root { --mermer: url(/static/ng/mermer-acik.webp); --mermer-isik: rgba(255, 255, 255, .55); }
/* Sohbette mermer soluk durur (bariz olmasın); giriş ekranı ve kenar panel kendi değerini kullanır */
.cini-zemin { --mermer-saydam: .42; }
:root[data-theme="dark"] .cini-zemin { --mermer-saydam: .5; }
:root[data-theme="dark"] { --mermer: url(/static/ng/tas-gece.webp); --mermer-isik: rgba(150, 175, 220, .08); }
.cini-zemin, .giris-sahne { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.mermer { position: absolute; inset: -3%; background: var(--mermer) center / cover no-repeat; will-change: transform;
  opacity: var(--mermer-saydam, 1);
  animation: mermerGir .8s ease both, mermerKay 70s ease-in-out .8s infinite alternate; }
@keyframes mermerGir { from { opacity: 0; } }
@keyframes mermerKay { to { transform: translate3d(-1.6%, -1.2%, 0) scale(1.03); } }
/* Kayan ışık: geniş, yumuşak, eğik bir şerit; ekranı ~9 sn'de geçer, sonra bir süre görünmez */
.mermer-isik { position: absolute; top: -20%; bottom: -20%; left: 0; width: 34%; will-change: transform;
  background: linear-gradient(90deg, transparent, var(--mermer-isik) 50%, transparent);
  transform: translateX(-130%) skewX(-18deg); opacity: .8; animation: isikKay 19s cubic-bezier(.45, 0, .25, 1) 3s infinite; }
@keyframes isikKay { 0% { transform: translateX(-130%) skewX(-18deg); } 55%, 100% { transform: translateX(420%) skewX(-18deg); } }
/* Kayan yıldız: kendi açısıyla döndürülmüş noktadan kuyruklu bir çizgi kayar, ~1,3 sn görünür, sonra tur bitene
   kadar bekler (cini.js her turda yerini ve açısını değiştirir). Pırıltı: cilada bir an büyüyüp sönen dört köşeli ışık. */
:root { --yildiz-bas: #ffffff; --yildiz-kuyruk: rgba(31, 79, 168, .42); --yildiz-isik: rgba(110, 160, 255, .9); --piril-renk: #ffffff;
  --piril-hac: rgba(31, 79, 168, .6); }
:root[data-theme="dark"] { --yildiz-kuyruk: rgba(170, 205, 255, .55); --yildiz-isik: rgba(140, 185, 255, .95); --piril-renk: #e3edff;
  --piril-hac: #e3edff; }
.kayan-yildiz { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; rotate: var(--aci); pointer-events: none; }
/* Işıma filtreyle değil kendi boyamasıyla (gölge + baştaki parlak nokta): kayarken yeniden hesaplanmaz */
.kayan-yildiz::before { content: ""; position: absolute; right: 0; top: -1.5px; width: 150px; height: 3px; border-radius: 3px;
  background: radial-gradient(circle at calc(100% - 2px) 50%, #fff 0 1.5px, transparent 2.5px),
    linear-gradient(90deg, transparent, var(--yildiz-kuyruk) 72%, var(--yildiz-bas));
  box-shadow: 0 0 6px 0 var(--yildiz-isik);
  transform-origin: right center; opacity: 0; will-change: transform;
  animation: yildizKay var(--sure, 12s) linear var(--gecikme, 0s) infinite; }
@keyframes yildizKay {
  0% { opacity: 0; transform: translateX(0) scaleX(.15); }
  2.5% { opacity: 1; }
  10% { opacity: 0; transform: translateX(560px) scaleX(1); }
  100% { opacity: 0; transform: translateX(560px) scaleX(1); } }
/* Pırıltı: ortada parlak benek ve ince bir ışık haçı (filtre ve kırpma yok: bir kez boyanır, yalnız büyüyüp söner) */
.piril { position: absolute; left: var(--x); top: var(--y); width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none;
  scale: var(--olcek, 1);
  background:
    radial-gradient(circle, var(--piril-renk) 0 1.6px, var(--yildiz-isik) 2.4px, transparent 6px),
    linear-gradient(90deg, transparent, var(--piril-hac) 50%, transparent) center / 100% 1.4px no-repeat,
    linear-gradient(transparent, var(--piril-hac) 50%, transparent) center / 1.4px 100% no-repeat;
  opacity: 0; transform: scale(0); will-change: transform;
  animation: pirilda var(--sure, 9s) ease-in-out var(--gecikme, 0s) infinite; }
@keyframes pirilda {
  0% { opacity: 0; transform: scale(0) rotate(0deg); }
  5% { opacity: .95; transform: scale(1) rotate(45deg); }
  11% { opacity: 0; transform: scale(0) rotate(90deg); }
  100% { opacity: 0; transform: scale(0) rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { .kayan-yildiz, .piril { display: none; } }

/* Okunurluk: ortada, yazının arkasında yumuşak bir açıklık; kenarlarda mermer tam görünür */
.cini-zemin::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(58% 56% at 50% 46%, rgba(244, 248, 254, .74), rgba(244, 248, 254, .3) 62%, transparent 100%); }
:root[data-theme="dark"] .cini-zemin::after {
  background: radial-gradient(58% 56% at 50% 46%, rgba(9, 14, 24, .7), rgba(9, 14, 24, .28) 62%, transparent 100%); }
/* Porselen tabak: sohbet alanının sağ ortasında, %40'ı görünür (sağ kenardan taşar), arka planla kaynaşsın diye soluk;
   çok yavaş döner (küçük, kendi katmanında) */
.kose-tabak { position: absolute; --boy: 620px; opacity: .4; width: var(--boy); right: calc(var(--boy) * -.6); top: calc(50% - var(--boy) / 2);
  z-index: 1; will-change: transform;
  animation: tabakGir .9s cubic-bezier(.16, 1, .3, 1) .2s both, tabakDon 240s linear 1.1s infinite; }
@keyframes tabakGir { from { opacity: 0; translate: 40px 0; } }
@keyframes tabakDon { to { rotate: 360deg; } }
:root[data-theme="dark"] .cini-zemin .kose-tabak { opacity: .24; }
@media (max-width: 1100px) { .cini-zemin .kose-tabak { --boy: 420px; } }
@media (max-width: 760px) { .cini-zemin .kose-tabak { display: none; } }
.shell.pano-mode .cini-zemin, body.gomulu .cini-zemin { display: none; }
@media (prefers-reduced-motion: reduce) { .mermer, .mermer-isik, .kose-tabak { animation: none; } .mermer-isik { display: none; } }
/* Pano, Analiz, Yönetim: arkada ADRIA taşının dokusu (durağan). Açık temada neredeyse beyaz mavi-gri, koyu temada
   gece mavisi taş üstü koyulaştırılarak: kutular okunur kalsın. İçerik kendi içinde kaydığı için zemin yeniden boyanmaz. */
.shell.pano-mode .main { background: url(/static/ng/tas-acik.webp) center / cover no-repeat, var(--p-zemin); }
:root[data-theme="dark"] .shell.pano-mode .main {
  background: linear-gradient(rgba(9, 14, 24, .6), rgba(9, 14, 24, .6)), url(/static/ng/tas-gece.webp) center / cover no-repeat, var(--p-zemin); }

/* Kenar panelde taş doku, lacivertin içinde hafif (kaymaz): açık temada lacivert taş, koyu temada gece mavisi taş.
   Taşın çizgileri yazıların arasına giriyordu: doku buzlu cam gibi bulanıklaştırılır. Bulanıklık durağan görselin
   kendisinde (kendi katmanında, bir kez hesaplanır); sohbet satırlarının üzerine gelince yeniden hesaplanmaz.
   Kenarlarda bulanıklığın açtığı boşluk görünmesin diye taş panelden biraz taşar. */
.sidebar > .yan-mermer { inset: -12px; width: auto !important; opacity: .3; z-index: 0; animation: mermerGir .8s ease both;
  background-image: url(/static/ng/tas-lacivert.webp); background-position: 30% 60%; filter: blur(4px); will-change: transform; }
:root[data-theme="dark"] .sidebar > .yan-mermer { background-image: url(/static/ng/tas-gece.webp); opacity: .42; }
/* Giriş ekranı her temada açık (sohbetin açık hali gibi): ADRIA taşının açık mavi hali soluk, tabak sağda */
.giris-sahne { --mermer-isik: rgba(255, 255, 255, .55);
  --yildiz-bas: #ffffff; --yildiz-kuyruk: rgba(31, 79, 168, .42); --yildiz-isik: rgba(110, 160, 255, .9); --piril-renk: #ffffff;
  --piril-hac: rgba(31, 79, 168, .6); }
.giris-mermer { background-image: url(/static/ng/tas-mavi.webp); z-index: -1; opacity: .38; }   /* desenin ve ışığın altında */
/* Giriş ekranında tabak solda: sol kenarın ortasından taşar, %40'ı görünür; yazı onun sağından başlar */
.giris-kose { --boy: 520px; right: auto; left: calc(var(--boy) * -.6); animation-name: tabakSoldan, tabakDon; }
@keyframes tabakSoldan { from { opacity: 0; translate: -40px 0; } }
@media (max-width: 960px) { .giris-kose { display: none; } }

/* ---------- Giriş ekranı: çini karo deseni ve fener ----------
   Zemin: ng/desen.svg tekrar eden maske (bir kez boyanır). Fener: imleci izleyen yuvarlak katman; içinde aynı desen
   daha parlak. Fener ve içi zıt yönde kayar (cini.js), desen zemindekiyle hizalı kalır; yalnız transform değişir. */
:root { --desen: url(/static/ng/desen.svg); --desen-boy: 96px; }
.giris-sahne::before { content: ""; position: absolute; inset: 0; background: var(--desen-renk);
  -webkit-mask-image: var(--desen), var(--desen-maske); -webkit-mask-size: var(--desen-boy), 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat; -webkit-mask-composite: source-in;
  mask-image: var(--desen), var(--desen-maske); mask-size: var(--desen-boy), 100% 100%; mask-repeat: repeat, no-repeat;
  mask-composite: intersect; }
.fener { position: absolute; left: 0; top: 0; width: 420px; height: 420px; border-radius: 50%; opacity: 0;
  transition: opacity .7s ease; will-change: transform;
  -webkit-mask: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .55) 50%, transparent 100%);
  mask: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .55) 50%, transparent 100%); }
.fener.acik { opacity: 1; }
.fener::before { content: ""; position: absolute; inset: 0; background: radial-gradient(closest-side, var(--fener-isik), transparent); }
.fener-ic { position: absolute; left: 0; top: 0; width: 100vw; height: 100vh; will-change: transform; background: var(--fener-renk);
  -webkit-mask: var(--desen) 0 0 / var(--desen-boy) repeat; mask: var(--desen) 0 0 / var(--desen-boy) repeat; }

/* Sürekli dönen pahalı ışıklar: Pano/Analiz kutularının kenarında dolaşan ışık her karede kutuları yeniden
   boyatıyordu; kaldırıldı. Başlık parıltıları bir kez geçer. Karşılama kartları ve yazma kutusunda da aynı. */
:is(#pano, #analiz) :is(.pbox, .pcards)::before, :is(.welcome .card, .composer form)::before { content: none !important; animation: none !important; }
:is(.yon-ust, .pano-bar) h2 { animation-iteration-count: 1 !important; }
.card h3 { animation: none; background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--kart-baslik); }

/* ---------- Kenar panel ---------- */
.sidebar, .shell.yon-mode .yon-kenar {
  --ink: #eaf1ff; --muted: #9fb3da; --hairline: rgba(255, 255, 255, .10);
  --hover: rgba(255, 255, 255, .07); --hover-yazi: #ffffff; --hover-cizgi: rgba(255, 255, 255, .28);
  --surface: rgba(255, 255, 255, .10); --glass-strong: transparent; --vurgu-2: rgba(255, 255, 255, .16);
  --p-ink: #eaf1ff; --p-muted: #9fb3da; --p-faint: #8299c4; --p-line: rgba(255, 255, 255, .10);
  --p-accent: #ffffff; --p-chip: rgba(255, 255, 255, .10);
  color: var(--ink);
  background:
    radial-gradient(420px 300px at 0% 0%, rgba(42, 98, 201, .35), transparent 70%),
    linear-gradient(180deg, var(--lacivert-1) 0%, var(--lacivert-2) 46%, var(--lacivert-3) 100%);
}
:root[data-theme="dark"] :is(.sidebar, .shell.yon-mode .yon-kenar) {
  background:
    radial-gradient(420px 300px at 0% 0%, rgba(42, 98, 201, .22), transparent 70%),
    linear-gradient(180deg, #0c1322 0%, #0a101c 50%, #070b14 100%);
}
.sidebar { overflow: hidden; }
.sidebar .yan-marka { display: grid; place-items: center; padding: 24px 0 20px; flex-shrink: 0; position: relative; z-index: 1; }
.sidebar .sidebar-head { height: auto; padding: 4px 18px 14px; gap: 10px; position: relative; z-index: 1; }
.sidebar .new { height: 46px; border-radius: 999px; padding: 0 20px; gap: 12px; font-size: 14.5px; font-weight: 500;
  color: #fff; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .32); }
.sidebar .new:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .55); color: #fff; }
.sidebar .new svg { width: 18px; height: 18px; }
.sidebar .collapse-btn { width: 40px; height: 40px; border-radius: 50%; color: #fff;
  background: transparent; border: 1px solid rgba(255, 255, 255, .32); }
.sidebar .collapse-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .55); }
.sidebar .conv-list { padding: 0 12px 10px; position: relative; z-index: 1; }
.sidebar .conv-group { color: #9fb3da; opacity: 1; font-size: 11.5px; letter-spacing: .1em; padding: 14px 10px 8px; }
.sidebar .conv-group:not(:first-child) { margin-top: 6px; }
.sidebar .conv { position: relative; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 13.5px; color: #dfe8fb; }
.sidebar .conv::before { content: ""; width: 18px; height: 18px; flex-shrink: 0; background: currentColor; opacity: .8;
  -webkit-mask: var(--ikon-sohbet) center / contain no-repeat; mask: var(--ikon-sohbet) center / contain no-repeat; }
.sidebar .conv:has(.conv-isaret)::before { display: none; }
.sidebar .conv:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar .conv:hover * { color: #fff !important; }
.sidebar .conv.active { color: #fff; font-weight: 600; background: linear-gradient(90deg, #2d66d0 0%, #2556b6 100%);
  box-shadow: 0 10px 24px -12px rgba(60, 120, 240, .9), inset 0 1px 0 rgba(255, 255, 255, .18); }
.sidebar .conv.active::before { opacity: 1; }
.sidebar .conv .del { color: rgba(255, 255, 255, .7); }
.sidebar .conv-isaret { border-color: rgba(255, 255, 255, .25); border-top-color: #fff; }
.sidebar .conv-empty { color: #9fb3da; }
:root { --ikon-sohbet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3h11A2.5 2.5 0 0 1 20 5.5v8a2.5 2.5 0 0 1-2.5 2.5H10l-4.5 4v-4H6.5A2.5 2.5 0 0 1 4 13.5z'/%3E%3Cpath d='M8.5 9.5h7'/%3E%3C/svg%3E"); }

@media (max-width: 760px) { .sidebar { background: linear-gradient(180deg, var(--lacivert-1), var(--lacivert-3)); } }

/* Kenar panelin genişlik tutamacı: lacivert zeminde açık çizgi */
.sidebar .yan-tutamak:hover::after, .shell.yan-surukle .yan-tutamak::after { background: rgba(255, 255, 255, .25); }

/* Yönetim menüsü kenar panelle aynı lacivertte */
.shell.yon-mode .yon-kenar .yk-ust { color: #fff; border-bottom-color: rgba(255, 255, 255, .1); }

/* ---------- Üst bar ---------- */
.shell .topbar { height: 76px; padding: 0 28px 0 36px; gap: 14px; background: transparent; }
.topbar::before { display: none; }
.topbar .brand { display: none; }
body.gomulu .topbar .brand { display: flex; }
.tabs { gap: 30px; margin-left: 0; align-self: stretch; }
.tab { position: relative; height: 100%; padding: 0 2px; font-size: 15.5px; font-weight: 500; color: #31466f; }
:root[data-theme="dark"] .tab { color: #b6c6e6; }
.tab.active { color: var(--ink); font-weight: 700; }
.tab::after { left: -6px !important; right: -6px !important; bottom: 18px !important; height: 3px !important; border-radius: 3px;
  background: var(--kobalt) !important; }
:root[data-theme="dark"] .tab::after { background: #6f9bff !important; }
.tab:hover { color: var(--kobalt); }
:root[data-theme="dark"] .tab:hover { color: #fff; }
.tema-dugme { width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); }
.tema-dugme:hover { background: var(--hover); color: var(--hover-yazi); }
.tema-dugme svg { width: 22px; height: 22px; }
.ust-ayrac { width: 1px; height: 28px; background: var(--hairline); margin: 0 2px; }
body.gomulu .ust-ayrac { display: none; }
.alan-sec { border-radius: 999px !important; }

/* Hesap: sağ üstte baş harfli yuvarlak; menü aşağı açılır */
.hesap-alan { position: relative; }
body.gomulu .hesap-alan { display: none !important; }
.hesap-alan .hesap-dugme { width: auto; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; }
.hesap-alan .hesap-dugme:hover { background: var(--hover); }
.hesap-alan .hesap-harf { width: 42px; height: 42px; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: #fff;
  background: linear-gradient(145deg, var(--lacivert-1), var(--kobalt)); box-shadow: 0 6px 16px -8px rgba(13, 43, 96, .8); }
.hesap-alan .hesap-ad { display: none; }
.hesap-alan .hesap-dugme .ok { width: 16px; height: 16px; color: var(--ink); }
.hesap-alan .hesap-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 10px); width: 240px; z-index: 40;
  border-radius: 16px; padding: 8px; background: var(--surface); box-shadow: 0 24px 50px -20px rgba(10, 33, 80, .45); }

/* ==========================================================================
   Sohbet
   ========================================================================== */
#log { padding: 22px 28px 12px; }
/* Sohbet sütunu ana alanın %92'si (en çok 1400 px): yan panel açılıp kapanırken (ya da sürüklenince) ana alanla
   birlikte aynı yumuşaklıkla genişler/daralır. Yazma kutusu da aynı genişlikte (--sohbet-gen). */
:root { --sohbet-gen: min(92%, 1400px); }
.inner { max-width: var(--sohbet-gen); }
.row { gap: 16px; margin-bottom: 26px; align-items: flex-start; }
.avatar { width: 50px; height: 50px; border: 0; box-shadow: none; }
.ng-avatar { color: #fff; background: radial-gradient(circle at 30% 25%, #1d4797, var(--lacivert-2) 70%);
  box-shadow: 0 10px 22px -10px rgba(13, 43, 96, .8), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.ng-avatar .ng-mono { width: 28px; }
:is(.ng-avatar, .amblem-ic) { outline: 1px solid rgba(201, 162, 90, .5); outline-offset: -5px; }
.ng-avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(31, 79, 168, .14), 0 12px 24px -12px rgba(13, 43, 96, .8); }
:root[data-theme="dark"] .ng-avatar { box-shadow: 0 0 0 3px rgba(150, 175, 220, .14), 0 12px 24px -12px rgba(0, 0, 0, .8); }
.kisi-avatar { width: 46px; height: 46px; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(145deg, var(--lacivert-1), var(--kobalt)); box-shadow: 0 8px 18px -10px rgba(13, 43, 96, .8); }
.bubble { font-size: 15px; line-height: 1.65; }
.user .bubble { background: linear-gradient(135deg, #e3edfc 0%, #d3e2fa 100%); color: var(--lacivert-1); font-weight: 600;
  padding: 14px 22px; border-radius: 24px 24px 8px 24px; box-shadow: 0 10px 24px -18px rgba(13, 43, 96, .5); }
:root[data-theme="dark"] .user .bubble { background: linear-gradient(135deg, #2d66d0, #1f4fa8); color: #fff; }
.bot .bubble { background: var(--surface); border: 1px solid rgba(31, 79, 168, .08); border-radius: 26px; padding: 24px 28px 18px;
  box-shadow: 0 2px 4px rgba(16, 34, 74, .04), 0 30px 60px -34px rgba(16, 34, 74, .45); max-width: calc(100% - 66px); }
:root[data-theme="dark"] .bot .bubble { background: var(--yuzey-1); border-color: rgba(150, 175, 220, .14); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.bot .bubble strong { color: var(--lacivert-1); font-weight: 700; }
:root[data-theme="dark"] .bot .bubble strong { color: #fff; }
.bubble li::marker { color: var(--lacivert-1); }
:root[data-theme="dark"] .bubble li::marker { color: #86acff; }
.bubble ul, .bubble ol { padding-left: 22px; }
.bubble li { margin: 3px 0; padding-left: 4px; }
.bubble h1, .bubble h2, .bubble h3, .bubble h4 { margin: 14px 0 8px; font-size: 15.5px; color: var(--ink); }
/* Tablo: ince ızgara, açık başlık */
.table-wrap { border: 1px solid #d9e4f3; border-radius: 14px; background: var(--surface); margin: 12px 0 14px; }
:root[data-theme="dark"] .table-wrap { border-color: rgba(150, 175, 220, .18); }
.bubble table { font-size: 13.5px; }
.bubble th { background: #eef3fb; color: var(--ink); font-weight: 700; padding: 11px 14px; box-shadow: inset 0 -1px 0 #d9e4f3; border: 0; }
:root[data-theme="dark"] .bubble th { background: var(--yuzey-2); box-shadow: inset 0 -1px 0 rgba(150, 175, 220, .18); }
.bubble td { padding: 10px 14px; border-top: 1px solid #e6edf7; }
.bubble tr:first-child td { border-top: 0; }
.bubble :is(td, th) + :is(td, th) { border-left: 1px solid #e6edf7; }
:root[data-theme="dark"] .bubble td, :root[data-theme="dark"] .bubble :is(td, th) + :is(td, th) { border-color: rgba(150, 175, 220, .12); }
.bubble tbody tr:nth-child(even) td { background: transparent; }
.bubble tbody tr:hover td { background: rgba(31, 79, 168, .04); }
/* Alıntı: bilgi notu (ör. "Not: …" ya da çekince) */
.bubble blockquote { margin: 12px 0; padding: 10px 14px 10px 42px; border-radius: 14px; position: relative;
  background: rgba(31, 79, 168, .06); color: var(--ink); font-size: 14px; }
.bubble blockquote::before { content: "i"; position: absolute; left: 13px; top: 11px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--kobalt); color: #fff; font: 700 12px/19px Georgia, serif; text-align: center; }
.bubble blockquote p { margin: 0; }
/* Alt bilgi: süre, kopyala, Excel, geri bildirim */
.meta { gap: 8px; margin-top: 14px; }
.chip { background: var(--chip-bg); color: var(--muted); padding: 4px 10px; }
:is(.copy, .disa-cevap) { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  border: 1px solid #d6e1f2 !important; border-radius: 999px !important; background: var(--surface) !important;
  color: var(--ink) !important; font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
:is(.copy, .disa-cevap):hover { border-color: var(--kobalt) !important; color: var(--kobalt) !important; background: rgba(31, 79, 168, .04) !important; }
:root[data-theme="dark"] :is(.copy, .disa-cevap) { border-color: rgba(150, 175, 220, .25) !important; }
:root[data-theme="dark"] :is(.copy, .disa-cevap):hover { color: #fff !important; border-color: #86acff !important; }
.copy::before { content: ""; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: var(--ikon-kopya) center / contain no-repeat; mask: var(--ikon-kopya) center / contain no-repeat; }
:root { --ikon-kopya: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2.5'/%3E%3Cpath d='M5 15H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5'/%3E%3C/svg%3E"); }
.disa-cevap svg { width: 14px; height: 14px; }
.typing span { background: var(--kobalt-2); }

/* Yazma kutusu */
.composer { padding: 10px 28px 18px; }
.composer form, .hint { max-width: var(--sohbet-gen); }
.composer form { min-height: 66px; align-items: center; gap: 10px; padding: 9px 9px 9px 24px; border-radius: 34px;
  background: #fff; border: 1px solid rgba(31, 79, 168, .14);
  box-shadow: 0 2px 4px rgba(16, 34, 74, .04), 0 22px 44px -26px rgba(16, 34, 74, .5); }
:root[data-theme="dark"] .composer form { background: var(--yuzey-1); border-color: rgba(150, 175, 220, .18); }
.composer form:focus-within { border-color: rgba(31, 79, 168, .45);
  box-shadow: 0 0 0 5px rgba(31, 79, 168, .08), 0 22px 44px -26px rgba(16, 34, 74, .5); }
.composer .icon-btn { width: 42px; height: 42px; border-radius: 50%; color: var(--kobalt); }
:root[data-theme="dark"] .composer .icon-btn { color: #86acff; }
.composer .icon-btn svg { width: 21px; height: 21px; }
textarea { font-size: 15.5px; padding: 10px 4px; }
textarea::placeholder { color: #7d8aa6; }
.send { width: 50px; height: 50px; border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 30% 25%, #2a5bb8, var(--lacivert-2) 75%);
  box-shadow: 0 10px 22px -10px rgba(13, 43, 96, .9); }
.send:hover { background: radial-gradient(circle at 30% 25%, #3a6fd0, var(--lacivert-1) 75%); color: #fff; }
.send svg { width: 21px; height: 21px; margin: 2px 2px 0 0; }
.send.stop svg { margin: 0; }
/* Cevap gelirken durdurma düğmesi: eski bordo yerine yeni temanın lacivert/kobalt dili (açık zemin, kobalt halka ve kare) */
:root { --dur-zemin: #e3edfc; --dur-zemin-2: #d3e2fa; --dur-cizgi: rgba(31, 79, 168, .45); --dur-ink: var(--kobalt); }
:root[data-theme="dark"] { --dur-zemin: rgba(45, 102, 208, .28); --dur-zemin-2: rgba(45, 102, 208, .42); --dur-cizgi: rgba(134, 172, 255, .6); --dur-ink: #86acff; }
/* Katmansız .send (yuvarlak lacivert) sohbet.css'teki .send.stop zeminini eziyordu: burada yeniden */
.send.stop, .send.stop:hover { background: var(--dur-zemin); color: var(--dur-ink); }
.send.stop:hover { background: var(--dur-zemin-2); }
.hint { margin-top: 10px; color: var(--muted); font-size: 11.5px; }

/* Cevap yazılırken, yazan cevabın amblemi etrafında ince süs halkası döner (küçük bir katman, ucuz) */
.ng-avatar { position: relative; }
body.asistan-dusunuyor #inner > .row.bot:last-child .ng-avatar::after { content: ""; position: absolute; inset: -8px;
  background: var(--kobalt-2); -webkit-mask: url(/static/ng/halka.svg) center / contain no-repeat;
  mask: url(/static/ng/halka.svg) center / contain no-repeat; animation: halkaDon 5s linear infinite; }
:root[data-theme="dark"] body.asistan-dusunuyor #inner > .row.bot:last-child .ng-avatar::after { background: #86acff; }
@keyframes halkaDon { to { transform: rotate(360deg); } }

/* ---------- Karşılama ---------- */
/* Amblem: lacivert disk içinde NG, çevresinde yavaş dönen ince süs halkası; açılırken diskten bir ışık
   halkası yayılır ve diskin üstünden bir kez parlaklık geçer */
.karsilama-amblem { position: relative; width: 96px; height: 96px; margin: 0 auto 18px;
  animation: amblemGir .7s cubic-bezier(.16, 1, .3, 1) both; }
.amblem-halka { position: absolute; inset: 0; background: var(--kobalt); opacity: .5; will-change: transform;
  -webkit-mask: url(/static/ng/halka.svg) center / contain no-repeat; mask: url(/static/ng/halka.svg) center / contain no-repeat;
  animation: halkaDon 80s linear infinite; }
:root[data-theme="dark"] .amblem-halka { background: #86acff; opacity: .45; }
.amblem-ic { position: absolute; inset: 19px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: #fff;
  background: radial-gradient(circle at 30% 25%, #2a5bb8, var(--lacivert-2) 72%);
  box-shadow: 0 12px 26px -10px rgba(13, 43, 96, .75), inset 0 0 0 1px rgba(255, 255, 255, .14); }
.amblem-ic .ng-mono { width: 32px; }
.amblem-ic::after { content: ""; position: absolute; inset: 0; transform: translateX(-110%);
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  animation: parlakGec 1.1s ease .45s 1 forwards; }
.karsilama-amblem::after { content: ""; position: absolute; inset: 19px; border-radius: 50%; border: 1.5px solid #6f9bff; opacity: 0;
  animation: halkaYay 1.4s cubic-bezier(.16, 1, .3, 1) .25s 1; }
@keyframes amblemGir { from { opacity: 0; transform: scale(.82); } }
@keyframes parlakGec { to { transform: translateX(110%); } }
@keyframes halkaYay { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
body.gomulu .karsilama-amblem { display: none; }
@media (prefers-reduced-motion: reduce) {
  .karsilama-amblem, .amblem-halka, .amblem-ic::after, .karsilama-amblem::after, .welcome h2, .welcome .welcome-alt, .welcome h2 em { animation: none; }
}
.welcome { padding-bottom: 6vh; }
.welcome::before { display: none; }
.karsilama-ust { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--kobalt); }
:root[data-theme="dark"] .karsilama-ust { color: #86acff; }
.welcome h2 { font-family: var(--serif); font-size: 50px; font-weight: 600; letter-spacing: -.01em; line-height: 1.08; margin-bottom: 6px;
  animation: yaziGir .6s cubic-bezier(.16, 1, .3, 1) .05s both; background: none; color: var(--ink); -webkit-background-clip: border-box; background-clip: border-box; }
.welcome h2 em { font-style: italic; color: var(--kobalt);
  background: linear-gradient(100deg, var(--kobalt) 30%, #6f9bff 50%, var(--kobalt) 70%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: parilti 1.6s ease .5s 1 both; padding-right: .06em; }
:root[data-theme="dark"] .welcome h2 em { background-image: linear-gradient(100deg, #86acff 30%, #ffffff 50%, #86acff 70%); }
.welcome .welcome-alt { font-size: 17px; font-weight: 500; color: var(--muted); margin: 0 0 30px;
  animation: yaziGir .6s cubic-bezier(.16, 1, .3, 1) .1s both; }
@keyframes yaziGir { from { opacity: 0; transform: translateY(12px); } }

/* Kartlar: porselen cam; renkler çiniden: kobalt, turkuaz, mercan */
.cards { gap: 18px; max-width: 860px; }
.card { background: rgba(255, 255, 255, .92); border: 1px solid rgba(31, 79, 168, .12); border-radius: 22px; padding: 20px 20px 16px;
  box-shadow: 0 1px 2px rgba(16, 34, 74, .04), 0 22px 40px -30px rgba(16, 34, 74, .55); }
:root[data-theme="dark"] .card { background: rgba(17, 26, 42, .92); border-color: rgba(150, 175, 220, .14); }
.card:nth-child(1) { --k1: #86acff; --k2: #1f4fa8; --k3: #163f91; --kart-rgb: 31, 79, 168; }
.card:nth-child(2) { --k1: #7fd6db; --k2: #1aa0a8; --k3: #0f7b82; --kart-rgb: 26, 160, 168; }
.card:nth-child(3) { --k1: #f2a49d; --k2: #c8463d; --k3: #a3322b; --kart-rgb: 200, 70, 61; }
.card-ikon { width: 42px; height: 42px; padding: 10px; border-radius: 50%; }
.card h3 { font-size: 16px; }
.card p { font-size: 12.8px; }
.card button { height: 36px; }
/* Köşede küçük, dönen çini rozeti */
.card::after { background:
  radial-gradient(120% 90% at 100% 0%, rgba(var(--kart-rgb), .10) 0%, rgba(var(--kart-rgb), 0) 60%); }
.card .card-ust::after { content: ""; position: absolute; right: -26px; top: -26px; width: 96px; height: 96px; opacity: .14;
  background: rgb(var(--kart-rgb)); -webkit-mask: var(--ikon-rozet) center / contain no-repeat; mask: var(--ikon-rozet) center / contain no-repeat;
  transition: transform 1.2s cubic-bezier(.16, 1, .3, 1), opacity .4s; }
.card:hover .card-ust::after { transform: rotate(90deg) scale(1.08); opacity: .26; }
:root { --ikon-rozet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-50 -50 100 100'%3E%3Cg fill='black'%3E%3Cpath id='y' d='M0 -8C7 -16 7 -30 0 -46C-7 -30 -7 -16 0 -8Z'/%3E%3Cuse href='%23y' transform='rotate(45)'/%3E%3Cuse href='%23y' transform='rotate(90)'/%3E%3Cuse href='%23y' transform='rotate(135)'/%3E%3Cuse href='%23y' transform='rotate(180)'/%3E%3Cuse href='%23y' transform='rotate(225)'/%3E%3Cuse href='%23y' transform='rotate(270)'/%3E%3Cuse href='%23y' transform='rotate(315)'/%3E%3Ccircle r='6'/%3E%3C/g%3E%3C/svg%3E"); }

/* Öneriler */
.chip-q { background: rgba(255, 255, 255, .94); border: 1px solid rgba(31, 79, 168, .16); color: var(--ink);
  padding: 10px 18px; font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 20px -16px rgba(16, 34, 74, .6); }
.chip-q:hover { border-color: rgba(31, 79, 168, .45); color: var(--kobalt); box-shadow: 0 12px 24px -14px rgba(31, 79, 168, .55); }
:root[data-theme="dark"] .chip-q { background: rgba(17, 26, 42, .92); border-color: rgba(150, 175, 220, .2); }
:root[data-theme="dark"] .chip-q:hover { color: #fff; border-color: #86acff; }

@media (max-width: 760px) {
  .shell .topbar { padding: 0 12px; height: 62px; gap: 8px; }
  /* Sekmeler sığmazsa kendi içinde kayar; sağdaki tema ve hesap düğmesi hep görünür */
  .tabs { gap: 16px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { font-size: 14px; flex-shrink: 0; }
  .tab::after { bottom: 14px !important; left: 0 !important; right: 0 !important; }   /* kenardan taşıp kaydırma açmasın */
  .alan-sec, .ust-ayrac, .hesap-alan .hesap-dugme .ok { display: none !important; }
  .tema-dugme { width: 36px; height: 36px; flex-shrink: 0; }
  .hesap-alan .hesap-harf { width: 36px; height: 36px; font-size: 13px; }
  #log, .composer { padding-left: 14px; padding-right: 14px; }
  .welcome h2 { font-size: 36px; }
  .kisi-avatar { display: none; }
  .avatar { width: 38px; height: 38px; }
  .ng-avatar .ng-mono { width: 22px; }
  .bot .bubble { padding: 16px 18px; max-width: calc(100% - 50px); }
}

/* ==========================================================================
   Giriş ekranı: lacivert zemin, fenerle aydınlanan çini karoları, porselen kart
   ========================================================================== */
.giris-sahne { --desen-boy: 112px; --desen-renk: rgba(31, 79, 168, .055);
  --fener-renk: rgba(31, 79, 168, .26); --fener-isik: rgba(143, 178, 238, .22);
  --desen-maske: radial-gradient(80% 90% at 30% 50%, #000 20%, transparent 85%); }
.giris-sahne .fener { width: 520px; height: 520px; }
/* Arkada çok yavaş süzülen yumuşak ışık (önceden boyanmış degrade, yalnız kayar) */
.giris-isik { position: absolute; left: 8%; top: 12%; width: 900px; height: 900px; border-radius: 50%; will-change: transform;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .85), rgba(219, 231, 251, .35) 55%, transparent);
  animation: isikSuzul 28s ease-in-out infinite alternate; }
@keyframes isikSuzul { to { transform: translate3d(18vw, 14vh, 0) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .giris-isik { animation: none; } }
.login-screen { padding: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(400px, .85fr); align-items: center;
  overflow: hidden;
  --ink: #10224a; --muted: #5d6b88; --hairline: rgba(16, 34, 74, .09); --surface: #fff;
  --danger-bg: #fff4f4; --danger-border: #f3caca; --danger-ink: #9b2c2c; color: var(--ink);
  background:
    radial-gradient(900px 520px at 78% 4%, rgba(255, 255, 255, .95), transparent 62%),
    radial-gradient(700px 600px at 12% 100%, rgba(143, 178, 238, .22), transparent 70%),
    linear-gradient(160deg, #f6f9fe 0%, #eaf1fb 52%, #dde8f7 100%); }
.giris-marka { position: relative; z-index: 1; padding: 0 6vw 0 max(8vw, calc(520px * .4 + 56px));
  animation: yaziGir .7s cubic-bezier(.16, 1, .3, 1) .1s both; }
/* Yazının arkasında açık bir hâle: taşın çizgileri metni bölmesin */
.giris-marka::before { content: ""; position: absolute; inset: -14% 0 -14% 2%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(246, 249, 254, .85) 0%, rgba(246, 249, 254, .45) 55%, transparent 100%); }
/* Logo başlıktan biraz geniş: başlığın yazı boyutuna bağlı ("Yapay Zeka Tabanlı" ~7,4 x yazı boyu, logo ~8,3 x) */
.giris-marka .ng-logo { position: relative; width: calc(clamp(40px, 4.7vw, 68px) * 8.3); max-width: 100%; margin-bottom: 40px; }
/* Logonun üstünden bir kez ışık geçer */
.giris-marka .ng-logo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 42%, rgba(111, 155, 255, .95) 50%, transparent 58%) 100% 0 / 300% 100%;
  -webkit-mask: url(/static/ng/logo-lacivert.png) left center / contain no-repeat; mask: url(/static/ng/logo-lacivert.png) left center / contain no-repeat;
  animation: logoIsik 1.6s ease .35s 1 both; }
@keyframes logoIsik { to { background-position: 0 0; } }
.giris-marka h1 { margin: 0 0 18px; font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 4.7vw, 68px); line-height: 1.04;
  letter-spacing: -.015em; }
/* İlk satır: kelimeler sırayla aşağıdan yükselir; altında Kütahya kobaltından bir süs belirir (dönerek gelen sekiz
   yapraklı çini rozeti ve ondan uzayıp silikleşen kıl çizgisi). Sonra ~8 sn'de bir kelimeler sırayla, dalga gibi
   kobalta bürünür ve hafifçe kalkar.
   Akıcılık için her şey ekran kartında döner: kalkış `translate` (girişteki `transform`tan ayrı özellik), renk ise
   kelimenin üstündeki kobalt kopyanın (::after) yalnız saydamlığıyla. `color` canlandırılınca Chrome bütün animasyonu
   ana iş parçacığına alıyor, birkaç piksellik kalkış da tam piksele yuvarlanıp basamak basamak görünüyordu. */
.giris-marka h1 .ust-satir { position: relative; display: inline-block; padding-bottom: 16px; margin-bottom: 2px; --dalga: #2458b8; }
.giris-marka h1 .ust-satir > span { position: relative; display: inline-block; will-change: transform, translate;
  animation: kelimeGir .9s cubic-bezier(.16, 1, .3, 1) both, kelimeDalga 8s cubic-bezier(.37, 0, .63, 1) infinite;
  animation-delay: calc(.2s + var(--i) * .13s), calc(2.2s + var(--i) * .3s); }
.giris-marka h1 .ust-satir > span::after { content: attr(data-k); position: absolute; left: 0; top: 0; color: var(--dalga);
  opacity: 0; pointer-events: none; will-change: opacity;
  animation: kelimeParla 8s cubic-bezier(.37, 0, .63, 1) infinite; animation-delay: calc(2.2s + var(--i) * .3s); }
@keyframes kelimeGir { from { opacity: 0; transform: translate3d(0, .45em, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes kelimeDalga { 0%, 22%, 100% { translate: 0 0; } 10% { translate: 0 -.05em; } }
@keyframes kelimeParla { 0%, 24%, 100% { opacity: 0; } 10% { opacity: 1; } }
/* Süs: solda rozet, ondan sağa doğru uzayan kobalt kıl çizgisi (rozetin ortasından geçer, sağda silikleşir) */
.giris-marka h1 .ust-satir::before { content: ""; position: absolute; left: 0; bottom: 0; width: 15px; height: 15px; translate: 0 50%;
  background: var(--kobalt); -webkit-mask: var(--ikon-rozet) center / contain no-repeat; mask: var(--ikon-rozet) center / contain no-repeat;
  animation: rozetGir .9s cubic-bezier(.16, 1, .3, 1) .85s both, rozetDon 26s linear 1.75s infinite; }
@keyframes rozetGir { from { opacity: 0; transform: rotate(-140deg) scale(.3); } }
@keyframes rozetDon { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.giris-marka h1 .ust-satir::after { content: ""; position: absolute; left: 22px; right: 28%; bottom: 0; height: 1.5px; border-radius: 2px;
  translate: 0 50%; background: linear-gradient(90deg, rgba(31, 79, 168, .75), rgba(31, 79, 168, .35) 55%, rgba(31, 79, 168, 0));
  transform-origin: left center; transform: scaleX(0); animation: cizgiCiz 1.1s cubic-bezier(.65, 0, .35, 1) 1.15s forwards; }
@keyframes cizgiCiz { to { transform: scaleX(1); } }
/* İkinci satır: harf harf belirir (yazılıyormuş gibi), sonra üstünden ~8 sn'de bir mavi ışık geçer */
.giris-marka h1 em { display: block; font-style: italic; font-weight: 500;
  background: linear-gradient(100deg, var(--kobalt) 20%, #6f9bff 45%, #a9c4f5 60%, var(--kobalt) 80%) 100% 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em;
  animation: baslikIsik 8s ease-in-out 1.7s infinite; }
.giris-marka h1 em > span { opacity: 0; animation: harfGir .3s ease forwards; animation-delay: calc(.75s + var(--h) * .05s); }
@keyframes harfGir { to { opacity: 1; } }
@keyframes baslikIsik { 0% { background-position: 100% 0; } 22%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .giris-marka h1 .ust-satir > span, .giris-marka h1 em, .giris-marka h1 em > span { animation: none; opacity: 1; }
  .giris-marka h1 .ust-satir > span::after { display: none; }
  .giris-marka h1 .ust-satir::after, .giris-marka h1 .ust-satir::before { animation: none; transform: none; }
}

.login-screen .login-card { position: relative; z-index: 1; justify-self: center; max-width: 420px; padding: 38px 36px 26px;
  border-radius: 30px; color: var(--ink); text-align: left;
  background: transparent; border: 1px solid rgba(31, 79, 168, .10);
  box-shadow: 0 2px 4px rgba(16, 34, 74, .04), 0 40px 80px -36px rgba(16, 34, 74, .45); animation: kartYuksel .7s cubic-bezier(.16, 1, .3, 1) .15s both; }
@keyframes kartYuksel { from { opacity: 0; transform: translateY(40px) scale(.97); } }
/* Kartın çevresindeki animasyon: kenar boyunca dolaşan, maviden açık maviye dönen ince bir ışık ve kartın arkasında
   yavaşça nefes alan mavi bir hâle. Işık, sabit bir halka maskesinin içinde dönen büyük bir degrade; hâle yalnız
   saydamlık ve ölçekle oynar. İkisi de ekran kartında döner, kart yeniden boyanmaz. */
.login-screen .login-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #fff; }
.kart-hale { position: absolute; inset: -38px; z-index: -1; border-radius: 64px; pointer-events: none; will-change: transform, opacity;
  background: radial-gradient(closest-side, rgba(111, 155, 255, .34), rgba(111, 155, 255, .12) 62%, transparent 100%);
  animation: haleNefes 5s ease-in-out infinite alternate; }
@keyframes haleNefes { from { opacity: .45; transform: scale(.97); } to { opacity: 1; transform: scale(1.03); } }
.kart-cerceve { position: absolute; inset: -1px; border-radius: inherit; padding: 2px; overflow: hidden; pointer-events: none;
  background: rgba(31, 79, 168, .10);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.kart-cerceve i { position: absolute; left: 50%; top: 50%; width: 170%; aspect-ratio: 1; translate: -50% -50%; will-change: transform;
  background: conic-gradient(from 0deg, transparent 0deg 205deg, rgba(143, 178, 238, .18) 240deg, rgba(42, 98, 201, .9) 292deg,
    #6f9bff 312deg, #dbe7fb 326deg, rgba(31, 79, 168, .85) 338deg, transparent 352deg);
  animation: cerceveDon 6s linear infinite; }
@keyframes cerceveDon { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kart-hale, .kart-cerceve i { animation: none; } }
@media (prefers-reduced-motion: reduce) { .login-screen .login-card, .giris-marka { animation: none; } }
.login-screen .login-card h2 { text-align: left; font-family: var(--serif); font-size: 38px; font-weight: 600; margin: 0 0 26px; letter-spacing: -.01em; }
.login-screen .login-card label { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.login-screen .login-card input { height: 52px; border-radius: 16px; padding: 0 16px 0 46px; margin-bottom: 18px; font-size: 15px;
  background: #f2f6fd no-repeat 16px center / 18px; border: 1px solid transparent; color: var(--ink); transition: border-color .2s, box-shadow .2s, background-color .2s; }
.login-screen .login-card input:focus { background-color: #fff; border-color: rgba(31, 79, 168, .45); box-shadow: 0 0 0 5px rgba(31, 79, 168, .10); }
#username { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6b88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
#password { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6b88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2.5'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }
.login-screen .login-card input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #f2f6fd inset; }
.login-screen .login-card #loginBtn { position: relative; overflow: hidden; height: 54px; margin-top: 4px; border-radius: 16px;
  font-size: 15px; font-weight: 700; letter-spacing: .01em; color: #fff;
  background: linear-gradient(135deg, #2a5bb8 0%, var(--lacivert-1) 55%, var(--lacivert-2) 100%);
  box-shadow: 0 18px 34px -16px rgba(13, 43, 96, .9); }
.login-screen .login-card #loginBtn:hover { color: #fff; background: linear-gradient(135deg, #3a6fd0 0%, #12357a 55%, var(--lacivert-2) 100%); }
.login-screen .login-card #loginBtn span::after { content: "→"; display: inline-block; margin-left: 10px; transition: transform .3s; }
.login-screen .login-card #loginBtn:hover span::after { transform: translateX(4px); }
/* Düğmenin üstünden geçen ışık */
.login-screen .login-card #loginBtn::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  animation: dugmeIsik 1.1s ease-in-out 1s 1 both; }
@keyframes dugmeIsik { to { transform: translateX(120%); } }
.giris-imza { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--hairline); font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.giris-imza img { display: block; height: 17px; margin: 0; }
/* iyex logosu bağlantı: üstüne gelince belirginleşir ve hafifçe yükselir */
.iyex-baglanti { display: inline-flex; border-radius: 6px; opacity: .75; transition: opacity .2s ease, transform .2s ease; }
.iyex-baglanti:hover { opacity: 1; transform: translateY(-1px); }
.iyex-baglanti:focus-visible { opacity: 1; outline: 2px solid var(--kobalt); outline-offset: 3px; }
.giris-imza span { white-space: nowrap; }
.login-screen .login-error { border-radius: 14px; }
/* Portal oturumu yokken sahne sade kalır */
.login-screen:has(.portal-modu) :is(.giris-marka, .giris-sahne) { display: none; }
.login-screen:has(.portal-modu) { grid-template-columns: 1fr; }

@media (max-width: 960px) {
  .login-screen { grid-template-columns: 1fr; align-content: center; gap: 28px; padding: 32px 16px; overflow-y: auto; }
  .giris-sahne { --desen-maske: radial-gradient(90% 60% at 50% 20%, #000 10%, transparent 80%); }
  .giris-marka { padding: 0; text-align: center; }
  .giris-marka .ng-logo { margin: 0 auto 18px; width: min(330px, 88vw); }
  .giris-marka h1 { font-size: 40px; }
  .giris-marka h1 .ust-satir::before { left: 50%; translate: -50% 50%; }
  .giris-marka h1 .ust-satir::after { left: 0; right: 0; transform-origin: center;
    background: linear-gradient(90deg, rgba(31, 79, 168, 0), rgba(31, 79, 168, .6) 44%, transparent 44% 56%, rgba(31, 79, 168, .6) 56%, rgba(31, 79, 168, 0)); }
  .login-screen .login-card { width: 100%; padding: 30px 22px 22px; }
}

/* ==========================================================================
   Diğer sayfalar: eski paletten (bordo, kiremit, bej, kahve) kalan renkler mavi dile taşınır.
   Kırmızı (kritik) ve amber (uyarı, orta yük, kısmi yetki) anlam taşıdığı için olduğu gibi kalır.
   ========================================================================== */
:root {
  /* Analiz: halka dilimleri, grup çubukları, aylık çubuklar */
  --d1: #1f4fa8; --d2: #4f7fd6; --d3: #93b1e8; --d4: #cddcf3; --g-bar: #2a62c9;
  /* Pano: kayıt türleri ve bölüm renkleri */
  --p-k-talep: #1f4fa8; --p-k-talep-bg: #e3ecfb; --p-k-siparis: #0f7b82; --p-k-siparis-bg: #dff3f4;
  --s-aksiyon: #10224a; --s-takip: #2f4f86; --s-teslim: #5b7bb3; --s-harcama: #93acd6;
}
:root[data-theme="dark"] {
  --d1: #7aa5ff; --d2: #4f7fe0; --d3: #2f5bb8; --d4: #2a3b5e; --g-bar: #4f7fe0;
  --p-k-talep: #9cbcff; --p-k-talep-bg: rgba(122, 165, 255, .16); --p-k-siparis: #6fd3d8; --p-k-siparis-bg: rgba(26, 160, 168, .18);
  --s-aksiyon: #e6ecf6; --s-takip: #a9c1ea; --s-teslim: #7f9ccc; --s-harcama: #5a74a0;
}
/* Pano: malzeme grubu etiketi */
.pgrp { --g: 31, 79, 168; background: rgba(var(--g), .09); color: #1f4fa8; }
:root[data-theme="dark"] .pgrp { --g: 122, 165, 255; background: rgba(var(--g), .14); color: #b9cfff; }
/* Takip listesindeki sayı hapları */
.msay { background: rgba(31, 79, 168, .10); color: #1f4fa8; }
:root[data-theme="dark"] .msay { background: rgba(122, 165, 255, .16); color: #b9cfff; }
.msay.yok { background: none; color: var(--p-faint); }
/* Uzman yetkileri: bölüm numarası ve açık düğme */
.ybolum-no { color: #163f91; background: #dbe7fb; }
:root[data-theme="dark"] .ybolum-no { color: #b9cfff; background: rgba(122, 165, 255, .18); }
.ykart[aria-checked="true"] .yanahtar { background: rgba(31, 79, 168, .16); }
.ykart[aria-checked="true"] .yanahtar::after { background: var(--kobalt-2); }
:root[data-theme="dark"] .ykart[aria-checked="true"] .yanahtar { background: rgba(122, 165, 255, .22); }
:root[data-theme="dark"] .ykart[aria-checked="true"] .yanahtar::after { background: #86acff; }
/* Sayfa başlıklarının bir kez geçen parıltısı */
:root:not([data-theme="dark"]) :is(.yon-ust, .pano-bar) h2 { --parilti-isik: #6f9bff; }
/* Organizasyon, kullanıcılar, roller: birim renkleri kobalt-turkuaz ailesinden (kahve-bordo yerine) */
:is(.org-av, .org-ikon).r-b0 { --av: 13, 43, 96;    --av-a: .14; --av-y: #0d2b60; --av-yk: #a9c1ea; }
:is(.org-av, .org-ikon).r-b1 { --av: 31, 79, 168;   --av-a: .14; --av-y: #1f4fa8; --av-yk: #9cbcff; }
:is(.org-av, .org-ikon).r-b2 { --av: 143, 178, 238; --av-a: .38; --av-y: #2f5aa8; --av-yk: #c3d6f8; }
:is(.org-av, .org-ikon).r-b3 { --av: 26, 160, 168;  --av-a: .16; --av-y: #0f7b82; --av-yk: #7fd6db; }
:is(.org-av, .org-ikon).r-b4 { --av: 63, 116, 232;  --av-a: .16; --av-y: #2a5bc4; --av-yk: #a9c5ff; }
:is(.org-av, .org-ikon).r-b5 { --av: 90, 110, 160;  --av-a: .18; --av-y: #3f5687; --av-yk: #b4c1e0; }
:is(.org-av, .org-ikon).r-b6 { --av: 20, 110, 140;  --av-a: .16; --av-y: #0f5f78; --av-yk: #86c9de; }
:is(.org-av, .org-ikon).r-b7 { --av: 160, 180, 210; --av-a: .36; --av-y: #4a5d80; --av-yk: #c9d6ea; }
:is(.org-av, .org-ikon).r-b8 { --av: 70, 60, 170;   --av-a: .14; --av-y: #3f35a0; --av-yk: #b9b2f0; }
.org-av.r-birimsiz { --av: 16, 34, 74; background: rgba(16, 34, 74, .12); color: #10224a; }
:root[data-theme="dark"] .org-av.r-birimsiz { background: rgba(122, 165, 255, .18); color: #b9cfff; }

/* Mobil: geçmiş sohbetler çekmecesi üst barın üstünde açılır (üst bar hesap menüsü için öne alınmıştı, çekmecenin
   üstüne biniyordu); arkası hafifçe kararır. Dışına dokununca kapanır (cini.js). */
@media (max-width: 760px) {
  .shell .sidebar { z-index: 8; }
  .shell .sidebar.open { box-shadow: 0 0 0 100vmax rgba(8, 20, 46, .35); }
}

/* Kaydırma çubukları: bej yerine mavi-gri */
:root { --p-kaydirma: #c9d6ea; --p-kaydirma-ust: #9fb4d6; }
:root[data-theme="dark"] { --p-kaydirma: #26344f; --p-kaydirma-ust: #3a4d72; }

/* ---------- Mobil düzeltmeleri ---------- */
@media (max-width: 640px) {
  /* Kutu başlıkları: başlık kendi satırında, araçlar (yenile, arama, sayı, Excel) altında; eskiden aynı satıra
     sıkışıp başlık kelime kelime bölünüyor, düğmelerin üstüne biniyordu */
  :is(.pbox-head, .plist-head) { flex-wrap: wrap; row-gap: 10px; }
  :is(.pbox-head, .plist-head) > .bas { flex: 1 1 100%; }
  .plist-head .plist-ara { flex: 1 1 auto; min-width: 0; }
  .plist-head .plist-ara input { width: 100%; }
  .plist-head .yenile-k { margin-left: 0; }
  /* Analiz özet şeridi 2x2 (dört sütunda değerler taşıyordu) */
  #analiz #hkpi { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #analiz #hkpi .pcell:nth-child(odd) { border-left: 0; }
  #analiz #hkpi .pcell:nth-child(n+3) { border-top: 1px solid var(--p-line); }
  /* Geniş tablolar kartın içinde yana kayar, kartın dışına taşmaz */
  :is(#hkiyasBody, #mdetail, .ktablo-kap) { overflow-x: auto; }
}
@media (max-width: 1000px) { .tabs { gap: 20px; } }
@media (max-width: 900px) {
  /* Yönetim menüsü dar ekranda içeriğin üstünde: kartlarla aynı hizada, yuvarlak köşeli lacivert bir kutu */
  .shell.yon-mode .yon-kenar { margin: 4px 28px 10px; border-radius: 18px; padding: 8px; border-bottom: 0; overflow-y: auto;
    box-shadow: 0 18px 34px -22px rgba(8, 25, 60, .7); }
}
@media (max-width: 420px) {
  /* Dört sekme ve sağdaki düğmeler aynı satıra sığsın */
  .tabs { gap: 9px; }
  .tab { font-size: 13px; }
  .shell .topbar { gap: 6px; padding: 0 10px; }
  .menu-btn { width: 30px !important; height: 30px; }
}

/* Pencereler (Ayarlar, Hesabım, eşikler, kullanıcı formu): arka karartma lacivert tonda, köşeler yuvarlak */
.modal-bg { background: rgba(8, 20, 46, .4); }
.modal { border-radius: 22px; box-shadow: 0 30px 70px -30px rgba(8, 25, 60, .55); }
:root[data-theme="dark"] .modal-bg { background: rgba(3, 6, 12, .6); }
:root[data-theme="dark"] .modal { border: 1px solid var(--hairline); }

/* ==========================================================================
   Pano, Analiz, Yönetim: kart dili (sohbet ekranıyla aynı)
   Beyaz porselen kartlar, geniş köşe ve yumuşak gölge; başlıklar lacivert, önünde küçük kobalt çini rozeti;
   sayfa başlıkları serif; tablolar, sekme hapları ve düğmeler kobalt tonlarında.
   ========================================================================== */
:root { --kart-kose: 20px; --kart-cizgi-2: rgba(31, 79, 168, .10);
  --kart-golge-2: 0 1px 2px rgba(16, 34, 74, .04), 0 22px 44px -32px rgba(16, 34, 74, .38);
  --tablo-bas: #f3f7fd; --tablo-bas-yazi: #5b6c91; --satir-ust: rgba(31, 79, 168, .04); --rozet-renk: var(--kobalt); }
:root[data-theme="dark"] { --kart-cizgi-2: rgba(150, 175, 220, .12);
  --kart-golge-2: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 48px -30px rgba(0, 0, 0, .85);
  --tablo-bas: var(--yuzey-2); --tablo-bas-yazi: #9aabcb; --satir-ust: rgba(122, 165, 255, .06); --rozet-renk: #86acff; }

/* Sayfa başlıkları (Pano, Analiz, Yönetim bölümleri): serif, karşılama başlığıyla aynı aile */
:is(.pano-bar, .yon-ust) h2 { font-family: var(--serif); font-size: 36px; font-weight: 600; letter-spacing: -.01em; line-height: 1.05;
  padding-bottom: .2em; margin-bottom: -.2em; }   /* parıltı yazıyı kutu içinde boyar: g, y, ç, ş kuyrukları kesilmesin */
/* Yönetim araç satırı: seçiciler 36 px, yuvarlak yenile düğmesi (34 px, dokunmatikte 40 px) onların tam ortasında */
#yonetim .yon-arac .yenile-k { margin-bottom: 1px; }
@media (max-width: 760px), (hover: none) { #yonetim .yon-arac .yenile-k { margin-bottom: -2px; } }
/* Tek satıra sığdırılan (üç noktalı) yazılar: Plus Jakarta'da ç, ş, ğ kuyrukları satır kutusundan ~1 px taşıyor,
   taşma kırpması onları kesiyordu. Kırpma kutusu 2 px büyür; eksi kenar boşluğuyla kaplanan yer aynı kalır. */
:is(.conv span, .hbar .ad, .tbas .tad, .hesap-ad, .esik-bas .ad, .prow .kim span, .prow .nm, .sema-kutu .ad, .org-unvan,
    .org-kisi .bilgi span, .rol-oge .ad, .utablo .ad, .cokyol-bas span, .cokyol-oge > span, .pgrup .ad, .yas-oge .ad,
    .yg-oge .ad) { padding-block: 2px; margin-block: -2px; }
.yon-ust > span { font-size: 13px; }

/* Kartlar */
:is(#pano, #analiz, #yonetim) :is(.pbox, .pcards) { background: var(--p-card); border: 1px solid var(--kart-cizgi-2);
  border-radius: var(--kart-kose); box-shadow: var(--kart-golge-2); }
.mitem:last-child { border-radius: 0 0 calc(var(--kart-kose) - 1px) calc(var(--kart-kose) - 1px); }
.pcards .pcell:first-child { border-radius: calc(var(--kart-kose) - 1px) 0 0 calc(var(--kart-kose) - 1px); }
.pust .pcards .pcell:first-child { border-radius: calc(var(--kart-kose) - 1px) calc(var(--kart-kose) - 1px) 0 0; }

/* Kart başlıkları: lacivert, önünde küçük kobalt çini rozeti */
:is(.pbox-head, .plist-head) { padding: 18px 22px 14px; border-bottom-color: var(--kart-cizgi-2); }
:is(.pbox-head, .plist-head) h3 { font-size: 16.5px; font-weight: 700; color: var(--p-ink); letter-spacing: -.01em; }
:is(.pbox-head, .plist-head) h3::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 9px;
  vertical-align: -1px; background: var(--rozet-renk); opacity: .9;
  -webkit-mask: var(--ikon-rozet) center / contain no-repeat; mask: var(--ikon-rozet) center / contain no-repeat; }

/* Özet şeridi (Pano durum kartları, Analiz göstergeleri, Yönetim sayıları) */
.pcell { padding: 18px 22px; }
.pcell b { font-size: 30px; font-weight: 700; color: var(--p-ink); }
.pcell .t { font-size: 12.5px; font-weight: 500; color: var(--p-muted); }
.pcell.sel { background: linear-gradient(180deg, rgba(31, 79, 168, .09), rgba(31, 79, 168, .03)); box-shadow: inset 3px 0 0 var(--kobalt); }
:root[data-theme="dark"] .pcell.sel { background: linear-gradient(180deg, rgba(122, 165, 255, .14), rgba(122, 165, 255, .05)); box-shadow: inset 3px 0 0 #86acff; }

/* Tablolar */
:is(.mtable, .ktablo) th { background: var(--tablo-bas); color: var(--tablo-bas-yazi); border-color: var(--kart-cizgi-2); }
:is(.mtable, .ktablo) td { border-bottom-color: var(--p-line); }
.mtable tbody tr:hover td, .ktablo tbody tr:hover td { background: var(--satir-ust); }
.prow-h { color: var(--tablo-bas-yazi); }
.prow:hover { background: var(--satir-ust); }

/* Sekme hapları ve parça seçiciler */
.ptab { height: 32px; padding: 0 14px; border-color: var(--kart-cizgi-2); font-weight: 500; }
.ptab.on { background: rgba(31, 79, 168, .12); color: #163f91; box-shadow: inset 0 0 0 1px rgba(31, 79, 168, .18); }
:root[data-theme="dark"] .ptab.on { background: rgba(122, 165, 255, .16); color: #c7d9ff; box-shadow: inset 0 0 0 1px rgba(122, 165, 255, .25); }
.segment { border-radius: 999px; border-color: var(--kart-cizgi-2); }
.segment button.on { background: rgba(31, 79, 168, .12); color: #163f91; }
:root[data-theme="dark"] .segment button.on { background: rgba(122, 165, 255, .16); color: #c7d9ff; }

/* Seçiciler, arama kutuları ve form alanları */
:is(.pano-bar, #pano, #analiz, #yonetim) select, .plist-ara input, .yara input, :is(.k-arac, .k-form) :is(input, select) {
  border-color: rgba(31, 79, 168, .16); border-radius: 12px; }
:is(.pano-bar, #pano, #analiz, #yonetim) select { border-radius: 999px; }
:root[data-theme="dark"] :is(:is(.pano-bar, #pano, #analiz, #yonetim) select, .plist-ara input, .yara input, :is(.k-arac, .k-form) :is(input, select)) {
  border-color: rgba(150, 175, 220, .18); }
:is(#pano, #analiz, #yonetim) :is(input, select):focus-visible { outline: 0; border-color: rgba(31, 79, 168, .5);
  box-shadow: 0 0 0 4px rgba(31, 79, 168, .10); }

/* Küçük düğmeler: yenile, Excel, satır işlemleri */
:is(#pano, #analiz, #yonetim) .yenile-k, .ibtn.disa { width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--kart-cizgi-2); background: var(--p-card); color: var(--p-muted); }
:is(#pano, #analiz, #yonetim) .yenile-k:hover, .ibtn.disa:hover { border-color: rgba(31, 79, 168, .35); color: var(--kobalt); background: var(--p-card); }
:root[data-theme="dark"] :is(:is(#pano, #analiz, #yonetim) .yenile-k, .ibtn.disa):hover { color: #c7d9ff; border-color: rgba(122, 165, 255, .4); }
.prow .acts .ibtn { border-radius: 10px; border-color: var(--kart-cizgi-2); }
.daha-dugme { border-radius: 999px; color: var(--kobalt); font-weight: 600; }
:root[data-theme="dark"] .daha-dugme { color: #9cbcff; }

/* Analiz: grafik çubuklarının rayı */
:is(.hbar, .gsatir) .cizgi { background: rgba(31, 79, 168, .07); border-radius: 999px; }
:root[data-theme="dark"] :is(.hbar, .gsatir) .cizgi { background: rgba(122, 165, 255, .08); }
.hbar .cizgi i { border-radius: 999px; }

/* Yönetim: yetki kartları, öbekler, geri bildirim kayıtları */
.ykart { border-radius: 16px; border-color: var(--kart-cizgi-2); }
.ykart:hover { border-color: rgba(31, 79, 168, .4); }
:is(.yobek, .yobek-blok, .fb-item) { border-radius: 14px; border-color: var(--kart-cizgi-2); }
.yobek-blok { border-left-color: var(--kobalt); }

/* Yönetim menü paneli: soldaki sohbet paneliyle aynı bulanık taş dokusu (durağan, bir kez hesaplanır) */
.shell.yon-mode .yon-kenar { position: relative; isolation: isolate; }
.shell.yon-mode .yon-kenar::before { content: ""; position: absolute; inset: -12px; z-index: -1; pointer-events: none;
  background: url(/static/ng/tas-lacivert.webp) 30% 60% / cover no-repeat; opacity: .3; filter: blur(4px); will-change: transform; }
:root[data-theme="dark"] .shell.yon-mode .yon-kenar::before { background-image: url(/static/ng/tas-gece.webp); opacity: .42; }


/* ==========================================================================
   Okunurluk ve erişilebilirlik
   ========================================================================== */
/* Onay kutuları ve seçim düğmeleri marka renginde */
:root { accent-color: #1f4fa8; }
:root[data-theme="dark"] { accent-color: #7aa5ff; }
textarea::placeholder, input::placeholder { color: #6b7a99; }
:root[data-theme="dark"] :is(textarea, input)::placeholder { color: #8a99b6; }
/* Koyu temada birim avatarlarının harfleri bir ton açık (3,9:1 kalıyordu) */
:root[data-theme="dark"] :is(.org-av, .org-ikon)[class*="r-b"] { color: color-mix(in srgb, var(--av-yk) 75%, #fff); }

/* En küçük yazı 11,5 px: tablo ve sıralama başlıkları, etiketler, avatar harfleri, grup kodları (10-11 px idi) */
:is(.mtable, .ktablo) th, .psira, .pgrp, .pill-tag, .gkod, .org-av, .gbas-adet, .k-gizle-dar, .gkpi-obek > .t, .gkod,
#yonetim label, .yon-arac label, .ykart .rozet { font-size: 11.5px !important; }
.pgrp { width: 104px; }

/* Grafikler mobilde küçülüp yazıları okunmaz olmasın: grafik en az 640 px kalır, kutunun içinde yana kayar */
@media (max-width: 640px) {
  :has(> .gbar) { overflow-x: auto; scrollbar-width: thin; }
  .gbar { min-width: 640px; }
}

/* Dokunmatik ekranda parmakla rahat basılabilecek boyutlar (en az ~40 px) */
@media (max-width: 760px), (hover: none) {
  .conv .del { opacity: .65; min-width: 36px; min-height: 36px; display: grid; place-items: center; margin: -8px -6px -8px 0; }
  .org-ac { min-width: 36px; min-height: 36px; }
  .psy { min-width: 38px; height: 38px; }
  .ibtn, .prow .acts .ibtn { width: 38px; height: 38px; }
  .fb button { width: 38px; height: 36px; }
  .psira { min-height: 34px; }
  :is(.ytumu, .wgrup-daha, .gdaha, .daha-dugme) { padding-top: 9px; padding-bottom: 9px; }
  .mini { min-height: 36px; padding-left: 12px; padding-right: 12px; }
  #yonetim input[type="checkbox"], .k-form input[type="checkbox"] { width: 22px; height: 22px; }
  :is(#pano, #analiz, #yonetim) .yenile-k, .ibtn.disa { width: 40px; height: 40px; }
}

/* ==========================================================================
   Sohbet ayrıntıları: ikonlar, "yazıyor", saatler, aşağı in, tabloyu büyüt
   ========================================================================== */
:root {
  --ikon-begen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10v11H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z'/%3E%3Cpath d='M7 10l4.2-7.2a1.8 1.8 0 0 1 3.3 1.3L13.7 9H19a2 2 0 0 1 2 2.3l-1.3 7.6A2.5 2.5 0 0 1 17.2 21H7'/%3E%3C/svg%3E");
  --ikon-begenme: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 14V3h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1z'/%3E%3Cpath d='M17 14l-4.2 7.2a1.8 1.8 0 0 1-3.3-1.3l.8-4.9H5a2 2 0 0 1-2-2.3l1.3-7.6A2.5 2.5 0 0 1 6.8 3H17'/%3E%3C/svg%3E");
  --ikon-cift-tik: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 13l4 4 9-10M10 16l1 1 9-10'/%3E%3C/svg%3E");
  --ikon-uyari: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
}
/* Geri bildirim: emoji yerine diğer ikonlarla aynı çizgi ikonlar */
.fb button { font-size: 0 !important; color: var(--muted); border-radius: 10px; }
.fb button::before { content: ""; width: 17px; height: 17px; background: currentColor;
  -webkit-mask: var(--ikon-begen) center / contain no-repeat; mask: var(--ikon-begen) center / contain no-repeat; }
.fb button.down::before { -webkit-mask-image: var(--ikon-begenme); mask-image: var(--ikon-begenme); }
.fb button:hover { color: var(--kobalt); background: rgba(31, 79, 168, .08); }
.fb button.on { color: var(--kobalt); background: rgba(31, 79, 168, .12); }
.fb button.on.down { color: #b4561c; background: rgba(217, 119, 6, .12); }
:root[data-theme="dark"] .fb button:hover, :root[data-theme="dark"] .fb button.on { color: #9cbcff; background: rgba(122, 165, 255, .14); }

/* "Yazıyor": dönen küçük çini rozeti, "Yanıt hazırlanıyor" ve dalgalanan üç benek */
.typing { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13.5px; padding: 2px 0; }
.typing::before { content: ""; order: 0; width: 18px; height: 18px; margin-right: 5px; background: var(--kobalt);
  -webkit-mask: var(--ikon-rozet) center / contain no-repeat; mask: var(--ikon-rozet) center / contain no-repeat;
  animation: halkaDon 2.6s linear infinite; }
.typing::after { content: "Yanıt hazırlanıyor"; order: 1; margin-right: 4px; }
.typing span { order: 2; width: 5px !important; height: 5px !important; margin: 0 !important; background: var(--kobalt-2) !important;
  opacity: 1 !important; animation: benekDalga 1.2s ease-in-out infinite !important; }
.typing span:nth-child(2) { animation-delay: .15s !important; } .typing span:nth-child(3) { animation-delay: .3s !important; }
@keyframes benekDalga { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
:root[data-theme="dark"] .typing::before { background: #86acff; }
@media (prefers-reduced-motion: reduce) { .typing::before, .typing span { animation: none !important; } }

/* Mesaj saatleri */
.user .bubble .zaman { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin: 4px -6px -4px 0;
  font-size: 11px; font-weight: 500; color: rgba(13, 43, 96, .5); }
.user .bubble .zaman::after { content: ""; width: 14px; height: 14px; background: #2a62c9; opacity: .8;
  -webkit-mask: var(--ikon-cift-tik) center / contain no-repeat; mask: var(--ikon-cift-tik) center / contain no-repeat; }
:root[data-theme="dark"] .user .bubble .zaman { color: rgba(255, 255, 255, .7); }
:root[data-theme="dark"] .user .bubble .zaman::after { background: #fff; }
.meta .zaman { font-size: 11.5px; color: var(--muted); margin-right: 4px; font-variant-numeric: tabular-nums; }

/* Aşağı in: yazma kutusunun üstünde ortada yuvarlak düğme; yeni cevap gelirken üstünde kobalt nokta */
.main > .asagi-in { position: absolute; z-index: 4; left: 50%; bottom: 128px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--kart-cizgi-2, rgba(31, 79, 168, .12)); background: var(--surface);
  color: var(--kobalt); cursor: pointer; box-shadow: 0 12px 26px -12px rgba(16, 34, 74, .5);
  opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .25s ease, transform .25s ease; }
.main > .asagi-in.acik { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.main > .asagi-in svg { width: 18px; height: 18px; }
.main > .asagi-in.yeni::after { content: ""; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--kobalt-2); box-shadow: 0 0 0 2px var(--surface); }
.shell.pano-mode .main > .asagi-in { display: none; }
:root[data-theme="dark"] .main > .asagi-in { color: #9cbcff; }

/* Tabloyu büyüt */
.tablo-arac { display: flex; justify-content: flex-end; margin: 10px 0 -6px; }
.tablo-buyut { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.tablo-buyut:hover { background: rgba(31, 79, 168, .08); color: var(--kobalt); }
.tablo-buyut svg { width: 13px; height: 13px; }
.tablo-tam { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background: rgba(8, 20, 46, .45); animation: tabloGir .25s ease both; }
.tablo-tam-kart { position: relative; width: min(1200px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  padding: 52px 22px 22px; border-radius: 22px; background: var(--surface); box-shadow: 0 40px 90px -30px rgba(8, 25, 60, .6);
  animation: kartYuksel .35s cubic-bezier(.16, 1, .3, 1) both; }
.tablo-tam-ic { overflow: auto; flex: 1; min-height: 0; }
.tablo-tam-balon { max-width: none !important; padding: 0 !important; background: none !important; border: 0 !important;
  box-shadow: none !important; border-radius: 0 !important; }
.tablo-tam-balon .table-wrap { max-height: none; margin: 0; }
.tablo-tam-balon table { font-size: 14px; }
.tablo-kapat { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.tablo-kapat:hover { background: rgba(31, 79, 168, .08); color: var(--kobalt); }
@keyframes tabloGir { from { opacity: 0; } }
:root[data-theme="dark"] .tablo-tam { background: rgba(3, 6, 12, .65); }
@media (max-width: 760px) { .tablo-tam { padding: 0; } .tablo-tam-kart { border-radius: 0; max-height: 100vh; height: 100%; } }

/* ==========================================================================
   Boş ve hata durumları: düz gri yazı yerine küçük çini işareti ve kısa metin
   ========================================================================== */
.pempty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 38px 20px; font-size: 13.5px; color: var(--p-muted); }
.pempty::before { content: ""; width: 46px; height: 46px; background: var(--rozet-renk, var(--kobalt)); opacity: .22;
  -webkit-mask: var(--ikon-rozet) center / contain no-repeat; mask: var(--ikon-rozet) center / contain no-repeat; }
.bos-eylem { height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(31, 79, 168, .2); background: var(--p-card);
  color: var(--kobalt); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.bos-eylem:hover { background: rgba(31, 79, 168, .06); }
.sidebar .conv-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 12px; color: #b9c8e8; text-align: center; }
.sidebar .conv-empty::before { content: ""; width: 36px; height: 36px; background: #fff; opacity: .28;
  -webkit-mask: var(--ikon-rozet) center / contain no-repeat; mask: var(--ikon-rozet) center / contain no-repeat; }
.conv-hata { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 30px 20px; }
.conv-hata::before { content: ""; width: 34px; height: 34px; background: var(--danger-ink, #9b2c2c); opacity: .7;
  -webkit-mask: var(--ikon-uyari) center / contain no-repeat; mask: var(--ikon-uyari) center / contain no-repeat; }
.conv-hata .retry, .bubble.error .retry { border-radius: 999px; padding: 6px 14px; }
.bot .bubble.error { position: relative; padding-left: 52px; border-color: rgba(200, 70, 61, .25); background: #fff7f6; }
.bot .bubble.error::before { content: ""; position: absolute; left: 22px; top: 25px; width: 18px; height: 18px; background: #c8463d;
  -webkit-mask: var(--ikon-uyari) center / contain no-repeat; mask: var(--ikon-uyari) center / contain no-repeat; }
:root[data-theme="dark"] .bot .bubble.error { background: rgba(200, 70, 61, .1); border-color: rgba(240, 120, 110, .3); }

/* ==========================================================================
   Grafikler: şık ipucu kutusu, üzerine gelinmeyen çubuklar soluklaşır, halka dilimi öne çıkar
   ========================================================================== */
.grafik-ipucu { position: fixed; left: 0; top: 0; z-index: 70; max-width: 260px; padding: 8px 12px; border-radius: 12px; pointer-events: none;
  background: var(--lacivert-2); color: #fff; font-size: 12.5px; font-weight: 500; line-height: 1.4;
  box-shadow: 0 14px 30px -14px rgba(8, 25, 60, .7); opacity: 0; transition: opacity .15s ease; will-change: transform; }
.grafik-ipucu.acik { opacity: 1; }
:root[data-theme="dark"] .grafik-ipucu { background: #1d2a42; border: 1px solid rgba(150, 175, 220, .2); }
.gbar:hover .gc:not(:hover) .b { opacity: .45; }
.gbar .gc:hover .b { filter: brightness(1.08); }
.ghalka .hdilim circle { transition: stroke-width .2s ease, opacity .2s ease; cursor: default; }
.ghalka .hdilim:hover circle:not(:hover) { opacity: .5; }
.ghalka .hdilim circle:hover { stroke-width: 30; }

/* ==========================================================================
   Mobil: tablolar yana kaymak yerine "başlık: değer" kartlarına dönüşür (cini.js her hücreye başlığını yazar)
   ========================================================================== */
@media (max-width: 640px) {
  table.kart-tablo, table.kart-tablo tbody, table.kart-tablo tr, table.kart-tablo td { display: block; width: auto; }
  table.kart-tablo thead, table.kart-tablo tr:has(> th) { display: none; }
  table.kart-tablo tr { padding: 12px 4px; border-bottom: 1px solid var(--p-line); }
  table.kart-tablo tr:last-child { border-bottom: 0; }
  table.kart-tablo td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 3px 0 !important;
    border: 0 !important; text-align: right !important; white-space: normal; }
  table.kart-tablo td::before { content: attr(data-etiket); flex: none; max-width: 48%; text-align: left; font-size: 12px;
    font-weight: 500; color: var(--p-faint); }
  table.kart-tablo td:first-child { justify-content: flex-start; text-align: left !important; font-weight: 600; padding-bottom: 6px !important; }
  table.kart-tablo td:first-child::before { display: none; }
  table.kart-tablo td:empty { display: none; }
  :is(#hkiyasBody, #mdetail, .ktablo-kap) { overflow-x: visible; }
}

/* ==========================================================================
   Portaldaki sohbet balonu (gömülü mod): NG logosu, hafif mermer, küçük amblem
   ========================================================================== */
body.gomulu .topbar .brand .mark img { display: none; }
body.gomulu .topbar .brand .mark::before { content: ""; display: block; width: 112px; aspect-ratio: 1080 / 73;
  background: url(/static/ng/logo-lacivert.png) center / contain no-repeat; }
:root[data-theme="dark"] body.gomulu .topbar .brand .mark::before { filter: brightness(0) invert(1); opacity: .9; }
body.gomulu .cini-zemin { display: block; --mermer-saydam: .3; }
body.gomulu .cini-zemin :is(.kose-tabak, .kayan-yildiz) { display: none; }
body.gomulu .welcome .karsilama-amblem { display: block; width: 72px; height: 72px; margin-bottom: 12px; }
body.gomulu .welcome .amblem-ic { inset: 14px; }
body.gomulu .welcome .amblem-ic .ng-mono { width: 26px; }
body.gomulu .welcome h2 { font-size: 34px; }
/* Balon dar (≈400 px): başlık tek satırda kalsın, logo yer açsın */
body.gomulu .g-baslik { white-space: nowrap; }
@media (max-width: 440px) {
  body.gomulu .topbar .brand .mark::before { width: 84px; }
  body.gomulu .g-dugme, body.gomulu .g-cikis { padding-inline: 6px; }
}

/* ==========================================================================
   Mobil görseller: telefonda zeminlerin 1000 px'lik hafif sürümleri iner (450-620 KB yerine 100-140 KB)
   ========================================================================== */
@media (max-width: 760px) {
  :root { --mermer: url(/static/ng/mermer-acik-k.webp); }
  :root[data-theme="dark"] { --mermer: url(/static/ng/tas-gece-k.webp); }
  .giris-mermer { background-image: url(/static/ng/tas-mavi-k.webp); }
  .sidebar > .yan-mermer { background-image: url(/static/ng/tas-lacivert-k.webp); }
  :root[data-theme="dark"] .sidebar > .yan-mermer { background-image: url(/static/ng/tas-gece-k.webp); }
  .shell.yon-mode .yon-kenar::before { background-image: url(/static/ng/tas-lacivert-k.webp); }
  :root[data-theme="dark"] .shell.yon-mode .yon-kenar::before { background-image: url(/static/ng/tas-gece-k.webp); }
  .shell.pano-mode .main { background: url(/static/ng/tas-acik-k.webp) center / cover no-repeat, var(--p-zemin); }
  :root[data-theme="dark"] .shell.pano-mode .main {
    background: linear-gradient(rgba(9, 14, 24, .6), rgba(9, 14, 24, .6)), url(/static/ng/tas-gece-k.webp) center / cover no-repeat, var(--p-zemin); }
}
