/* ============================================================
   ArfDAO — uygulama yüzeyleri (portal + admin + etkinlik sayfaları)
   style.css'in token'larını kullanır, üzerine ekler.
   ============================================================ */
:root {
  /* acik tema: kagit/lavanta uzerinde okunur tonlar */
  --ok: #0f7a44;
  --ok-soft: rgba(15, 122, 68, 0.14);
  --warn: #8a5a12;
  --warn-soft: rgba(138, 90, 18, 0.14);
  --err: #c0392b;
  --err-soft: rgba(192, 57, 43, 0.12);
  --sidebar-w: 248px;
}

/* ============================================================
   Portal + admin koyu kalir. style.css :root artik sicak/acik
   ARF Frontier temasi; asagidaki blok tum token'lari uygulama
   agaci icin eski koyu degerlere geri sarar. Herkese acik alt
   sayfalar (body.app YOK) sicak temayi oldugu gibi alir.
   ============================================================ */
body.app {
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, 0.16);
  --warn: #f0b64b;
  --warn-soft: rgba(240, 182, 75, 0.16);
  --err: #ff6b6b;
  --err-soft: rgba(255, 107, 107, 0.16);

  --blue: #0099ff;
  --blue-dark: #33adff;
  --blue-soft: rgba(0, 153, 255, 0.14);
  --blue-border: rgba(0, 153, 255, 0.38);
  --cyan: #0099ff;
  --cyan-light: #33adff;
  --cyan-pale: #7cc9ff;

  --ink: #ffffff;
  --ink-deep: #0a0a0a;
  --ink-2: #ababab;
  --muted: #a0a0a0;
  --muted-2: #8c8c8c;

  --line: rgba(255, 255, 255, 0.10);
  --line-dark: rgba(255, 255, 255, 0.10);
  --bg: #0d0d0d;
  --bg-soft: #1a1a1a;

  --surface: #1a1a1a;
  --surface-2: #262626;
  --cream: #ffffff;
  --on-accent: #0d0d0d;
  --btn: #0099ff;
  --btn-hover: #1aa3ff;

  --shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.30);

  background: var(--bg-soft);
  color: var(--ink-2);
  font-family: 'Inter', system-ui, sans-serif;
}
/* uygulamada birincil buton yine mavi dolu */
body.app .btn-primary { background: var(--blue); color: var(--on-accent); }
body.app .btn-primary:hover { background: var(--btn-hover); box-shadow: 0 14px 34px rgba(0, 153, 255, 0.30); }

/* ---------- Shell ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.app-side {
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.app-side .brand { padding: 22px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.app-side .brand .logo-chip { border-radius: 12px; padding: 8px 12px; }
.app-side .brand .lockup { height: 18px; }
.app-side nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.app-side nav .grp { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted-2); padding: 16px 12px 6px; }
/* Ekip baskani baska bir ekibin bolumunu gorebilir ama yazamaz. */
.app-side nav .grp-ro {
  display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
  text-transform: none; color: var(--muted-2);
}
/* Salt okunur sayfa uyarisi */
.ro-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 20px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg-soft); font-size: 13px; color: var(--muted);
}
.app-side nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  font-size: 14px; font-weight: 500; color: var(--muted); transition: background .15s, color .15s;
}
.app-side nav a .material-symbols-outlined { font-size: 20px; }
.app-side nav a:hover { background: var(--bg-soft); color: var(--ink); }
.app-side nav a.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.app-side .side-foot { padding: 14px; border-top: 1px solid var(--line); }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-top {
  height: 62px; background: rgba(18,30,66,0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; position: sticky; top: 0; z-index: 40;
}
.app-top h1 { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; color: var(--ink); }
.app-top .right { display: flex; align-items: center; gap: 14px; }
.app-content { padding: 26px; max-width: 1180px; width: 100%; }

.bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.bell:hover { border-color: var(--blue); color: var(--blue); }
.bell .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--err); color: var(--on-accent); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.usr { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 800; font-size: 13px; border: 1px solid var(--line); }
.usr .nm { font-size: 13.5px; font-weight: 600; color: var(--ink); }

.menu-pop { position: absolute; top: 54px; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,0.45); min-width: 220px; padding: 8px; z-index: 60; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); background: none; border: none; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg-soft); }
/* Bildirim menusu zil butonunun icinde aciliyor; butonun ortalama,
   renk ve yazi kalinligi mirasi burada sifirlaniyor. */
.notif-pop {
  display: flex; flex-direction: column; gap: 4px;
  width: min(360px, calc(100vw - 24px)); min-width: 0; max-height: 440px; overflow-y: auto;
  text-align: left; color: var(--ink-2); font-weight: 400; line-height: 1.45; cursor: default;
}
.notif-pop .notif-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 8px 10px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.notif-pop .notif-head b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.notif-pop .notif-head .linkish { font-size: 12px; cursor: pointer; white-space: nowrap; }
.notif-pop .it { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.notif-pop .it:hover { background: var(--bg-soft); }
.notif-pop .it.unread { background: var(--blue-soft); }
.notif-pop .it.unread:hover { background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue-border); }
.notif-pop .it b { font-size: 13px; font-weight: 700; color: var(--ink); }
.notif-pop .it span { font-size: 12.5px; color: var(--muted); }
.notif-pop .it .t { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.notif-pop .notif-empty { padding: 14px 8px; font-size: 13px; color: var(--muted); }

/* ---------- Cards / layout ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-soft); }
.card h3 { font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 4px; letter-spacing: -0.2px; }
.grid { display: grid; gap: 16px; }
/* minmax(0, 1fr): uzun bir dosya adı ya da URL sütunu genişletip ızgarayı taşırmasın */
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Form ızgaralarında satır aralığını alanın kendi alt boşluğu veriyor.
   Izgara boşluğu da eklenince tek sütuna düşünce iki alan arası iki katına çıkıyordu. */
.grid:has(> .field) { row-gap: 0; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
/* Boşluk yardımcıları her zaman kazanmalı: ".card h3 { margin-bottom: 4px }"
   gibi daha özgül kurallar mb16 verilen başlıkları 4px'te bırakıyor, altındaki
   açıklama satırı başlığın üstüne biniyordu. */
.mt8{margin-top:8px !important}.mt16{margin-top:16px !important}.mt24{margin-top:24px !important}
.mb8{margin-bottom:8px !important}.mb16{margin-bottom:16px !important}.mb24{margin-bottom:24px !important}

.stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat-tile .k { font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted-2); }
.stat-tile .v { font-size: 28px; font-weight: 800; letter-spacing: -1px; color: var(--ink); margin-top: 6px; }
.stat-tile .v.blue { color: var(--blue); }

.page-head { margin-bottom: 22px; }
.page-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.6px; color: var(--ink); }
.page-head p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted-2); padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tbl tr:last-child td { border-bottom: none; }
/* <td class="row"> tablo hücresi kalsın: flex yapılınca hücre satırdan
   kopuyor, düğmeler ayrı bir sütun gibi kayıyordu (etkinlik listesi). */
.tbl td.row { display: table-cell; text-align: right; vertical-align: middle; white-space: nowrap; }
.tbl td.row > * { display: inline-flex; vertical-align: middle; margin: 2px 0 2px 6px; }
.tbl td.row > *:first-child { margin-left: 0; }
.tbl td { vertical-align: middle; }
/* satır sonundaki "diğer işlemler" menüsü */
/* tablo köşeleri için overflow:hidden menüyü kesiyordu */
.tbl:has(.tbl-menu) { overflow: visible; }
.tbl:has(.tbl-menu) thead th:first-child { border-top-left-radius: 14px; }
.tbl:has(.tbl-menu) thead th:last-child { border-top-right-radius: 14px; }
.tbl-menu { position: relative; display: inline-block; }
.tbl-menu > summary { list-style: none; cursor: pointer; }
.tbl-menu > summary::-webkit-details-marker { display: none; }
.tbl-menu[open] > summary { background: var(--line); }
.tbl-menu .tbl-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: grid; gap: 2px; text-align: left; }
.tbl-menu .tbl-menu-list button, .tbl-menu .tbl-menu-list a { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: none;
  border-radius: 8px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; white-space: nowrap; }
.tbl-menu .tbl-menu-list button:hover, .tbl-menu .tbl-menu-list a:hover { background: var(--bg-soft); }
.tbl-menu .tbl-menu-list button:disabled { opacity: .5; cursor: default; }
.tbl-menu .tbl-menu-list .danger { color: var(--err); }
.tbl-menu .tbl-menu-list .material-symbols-outlined { font-size: 18px; color: var(--muted); }
.tbl-menu .tbl-menu-list .danger .material-symbols-outlined { color: var(--err); }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--blue-soft); }
.rank { font-weight: 800; color: var(--muted-2); width: 34px; }
.rank.top { color: var(--blue); }

/* ---------- Badges / chips ---------- */
.badge2 { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.2px; }
.badge2.ok { background: var(--ok-soft); color: var(--ok); }
.badge2.warn { background: var(--warn-soft); color: var(--warn); }
.badge2.err { background: var(--err-soft); color: var(--err); }
.badge2.blue { background: var(--blue-soft); color: var(--blue); }
.badge2.gray { background: var(--bg-soft); color: var(--muted); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 36px; display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--blue-border); color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }

.pts { font-weight: 800; color: var(--blue); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 14px; background: var(--surface); color: var(--ink);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.btn.sm { padding: 8px 16px; font-size: 13px; }
.btn.blk { display: flex; width: 100%; justify-content: center; }
.btn.danger { background: var(--err); color: var(--on-accent); }
.btn.subtle { background: var(--bg-soft); color: var(--ink-2); }
.linkish { color: var(--blue); font-weight: 600; cursor: pointer; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding-bottom: 10px; }
.kcol { flex: 0 0 300px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.kcol > h4 { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted-2); margin-bottom: 10px; display: flex; justify-content: space-between; }
.kcol.drop { outline: 2px dashed var(--blue); outline-offset: -2px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 9px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: 0.4; }
.kcard .tt { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.kcard .ds { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.kcard .meta { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.kcard .who { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-2); font-weight: 600; }
.kcard .who .avatar { width: 20px; height: 20px; font-size: 9px; }
/* görev detayları: öncelik, alt görev sayacı, bağlantı, çoklu atama */
.kcard .kpri { margin-bottom: 6px; font-size: 10.5px; }
.kcard .kchk { display: inline-flex; align-items: center; gap: 4px; margin-top: 7px;
  font-size: 11.5px; color: var(--muted-2); font-weight: 600; }
.kcard .kchk .material-symbols-outlined { font-size: 14px; }
.kcard .klink { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  border: 1px solid var(--line); color: var(--muted-2); }
.kcard .klink:hover { border-color: var(--blue); color: var(--blue); }
.kcard .klink .material-symbols-outlined { font-size: 15px; }
.kcard .who .avatar + .avatar { margin-left: -6px; }

/* görev dağılımı kutuları */
.assign-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.assign-chip { position: relative; }
.assign-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.assign-chip span {
  display: inline-flex; align-items: center; min-height: 32px; padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.assign-chip span:hover { border-color: var(--blue-border); color: var(--blue); }
.assign-chip input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.assign-chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.kadd { width: 100%; padding: 9px; border: 1px dashed var(--line); border-radius: 9px; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.kadd:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Modal ---------- */
.ovl { position: fixed; inset: 0; background: rgba(4,8,20,0.66); display: grid; place-items: center; z-index: 200; padding: 20px; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto; }
.modal h3 { font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 16px; }

/* ---------- Toast ---------- */
#toaster { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.toast { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); padding: 13px 18px; border-radius: 11px; font-size: 13.5px; font-weight: 500; box-shadow: 0 12px 30px rgba(0,0,0,0.45); max-width: 340px; animation: tin .25s ease; }
.toast.ok { background: var(--ok); color: var(--on-accent); border-color: transparent; }
.toast.err { background: var(--err); color: var(--on-accent); border-color: transparent; }
@keyframes tin { from { transform: translateY(12px); opacity: 0; } }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; background: var(--bg-soft); }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 34px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.auth-card .logo-chip { border-radius: 12px; padding: 9px 14px; }
.auth-tabs { display: flex; gap: 6px; background: var(--bg-soft); border-radius: 999px; padding: 4px; margin: 20px 0 22px; }
.auth-tabs button { flex: 1; min-height: 40px; padding: 9px; border: none; border-radius: 999px; background: none; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.auth-tabs button.active { background: var(--surface-2); color: var(--blue); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* ---------- Public events ---------- */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.ev-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.ev-card:hover { transform: translateY(-4px); border-color: var(--blue-border); box-shadow: var(--shadow); }
/* Kapaklar kirpilmiyor: yuklenen gorselin tamami gorunsun diye
   "contain". Boylece dikey/kare/panoramik her gorsel oldugu gibi
   cikiyor, kartlar da ayni yukseklikte kaliyor. */
.ev-card .cov { height: 168px; background: var(--bg-soft); position: relative; }
.ev-card .cov img { width: 100%; height: 100%; object-fit: contain; object-position: center; position: relative; z-index: 1; }
.ev-card .cov .type { z-index: 2; }

/* Bos kalan kenarlar gorselin kendi renkleriyle dolsun: ayni gorselin
   bulanik ve buyutulmus kopyasi zemine seriliyor (--kapak degiskenini
   app.js yaziyor). */
.has-kapak { position: relative; overflow: hidden; isolation: isolate; }
.has-kapak::before {
  content: ""; position: absolute; inset: -12%;
  background-image: var(--kapak); background-size: cover; background-position: center;
  filter: blur(26px) saturate(1.5) brightness(.92);
  transform: scale(1.12); z-index: 0; pointer-events: none;
}
.has-kapak::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.28));
}
@media (prefers-reduced-motion: reduce) { .has-kapak::before { filter: blur(20px); } }
.ev-card .cov .type { position: absolute; left: 12px; top: 12px; }
.ev-card .bd { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ev-card .dt { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.5px; }
.ev-card h3 { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -0.3px; }
.ev-card p { font-size: 13.5px; color: var(--muted); flex: 1; }
.ev-card .foot { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted-2); margin-top: 4px; }

.mini-avatars { display: flex; }
.mini-avatars .avatar { width: 26px; height: 26px; font-size: 10px; margin-left: -7px; border: 2px solid var(--surface); }
.mini-avatars .avatar:first-child { margin-left: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-side { position: fixed; left: 0; top: 0; z-index: 120; width: 248px; transform: translateX(-100%); transition: transform .25s; }
  .app-side.open { transform: none; }
  .app-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 110; }
  .grid.c2, .grid.c3 { grid-template-columns: minmax(0, 1fr); }
  /* dört sütunlu ızgaralar (puan, etkinlik sayısı gibi kısa kutular) 2x2 kalsın;
     tek sütunda her kutu tüm genişliği kaplayıp sayfayı uzatıyordu */
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-burger { display: grid !important; }
}

/* Telefonda tablolar (basvuru listesi, uye listesi...) sayfayi tasirmasin;
   kendi icinde yatay kaysin. thead ve tbody ayni min-width ve table-layout
   ile ayarlaniyor ki sutunlar hizali kalsin. */
/* 1100px'e kadar: tablolar 701px üstünde sayfayı taşırıyordu (leaderboard
   768px'te 42px, kenar çubuğu açıkken 960px'te 98px). */
@media (max-width: 1100px) {
  .tbl { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl > thead, .tbl > tbody { display: table; width: 100%; min-width: 580px; table-layout: fixed; }
  .tbl th:first-child, .tbl td:first-child { width: 38%; }
  /* dar ekranda tablo yatay kaysın; menü hücrenin içinde açılsın */
  .tbl:has(.tbl-menu) { overflow-x: auto; }
  .tbl-menu .tbl-menu-list { position: static; margin-top: 6px; box-shadow: none; }
}
/* Üst çubuk: telefonda uzun sayfa başlığı ile kullanıcı adı sığmıyordu. */
@media (max-width: 520px) {
  .app-top { padding: 0 14px; gap: 10px; }
  .app-top > .row { min-width: 0; }
  .app-top h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .app-top .right { gap: 8px; flex: 0 0 auto; }
  .usr .nm, .usr > .material-symbols-outlined { display: none; }
}
@media (max-width: 700px) {
  .tbl th, .tbl td { padding: 12px 13px; }
  .page-head h2 { font-size: 21px; }
  .chips { gap: 7px; }
  .chip { min-height: 38px; }
}
.app-burger { display: none; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }

/* ---------- Hareketi azalt ---------- */
@media (prefers-reduced-motion: reduce) {
  .ev-card:hover { transform: none; }
}

/* ---------- profil doluluk çubuğu ---------- */
.pr-bar { height: 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; }
.pr-bar span { display: block; height: 100%; background: var(--blue); transition: width .4s ease; }
.pr-opt { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.pr-opt:last-of-type { border-bottom: 0; }
.pr-opt input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.pr-opt b { color: var(--ink); font-weight: 600; }
.pr-opt small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.5; }

/* ---------- kapak görseli yükleme ---------- */
.up-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 14px; }
.up-row .up-prev {
  width: 54px; height: 40px; object-fit: contain; background: var(--bg-soft); border-radius: 8px;
  border: 1px solid var(--line); flex: 0 0 auto;
}
.up-row .up-state { font-size: 12.5px; }
.up-row label.btn { cursor: pointer; }
.up-row label.btn.is-busy { opacity: .6; pointer-events: none; }

/* ---------- markdown içerik (App.md): Defter ve blog ---------- */
.md { font-size: 15.5px; line-height: 1.75; color: var(--ink-2); overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md h2 { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; margin: 28px 0 8px; }
.md h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin: 22px 0 6px; }
.md h4 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 18px 0 4px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md li.md-task { list-style: none; margin-left: -22px; display: flex; gap: 9px; align-items: flex-start; }
.md li.md-task input { width: auto; margin-top: 6px; flex: 0 0 auto; }
.md li.md-task.done span { color: var(--muted); text-decoration: line-through; }
.md blockquote { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--blue); background: var(--bg-soft); border-radius: 0 10px 10px 0; }
.md code { font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.md pre.md-code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow: auto; margin: 0 0 12px; }
.md pre.md-code code { border: 0; padding: 0; background: none; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.md .md-table { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 10px; }
.md table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.md th { background: var(--bg-soft); font-size: 12.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .4px; }
.md tr:last-child td { border-bottom: 0; }
.md a.md-ref { color: var(--blue); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.md a.md-ref.missing { color: var(--muted); }

/* ---------- Puan çipi ve özeti (0028) ---------- */
.pts-wrap { position: relative; }
.pts-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 10px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer;
}
.pts-chip[hidden] { display: none; }
.pts-chip:hover, .pts-chip[aria-expanded="true"] { border-color: var(--blue); }
.pts-chip > .material-symbols-outlined { font-size: 18px; color: var(--blue); font-variation-settings: 'FILL' 1; }
.pts-chip b { font-size: 14px; font-weight: 800; }
.pts-chip .pts-lbl { color: var(--muted); font-weight: 600; }
.pts-streak {
  display: inline-flex; align-items: center; gap: 2px; margin-left: 2px; padding-left: 8px;
  border-left: 1px solid var(--line); font-weight: 800; color: var(--warn);
}
.pts-streak .material-symbols-outlined { font-size: 17px; font-variation-settings: 'FILL' 1; }
.pts-warn {
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 800;
}
.pts-pop {
  position: absolute; top: 48px; right: 0; z-index: 60;
  width: min(370px, calc(100vw - 24px)); max-height: min(580px, calc(100dvh - 90px)); overflow: hidden auto;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior: contain;
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); text-align: left;
}
.pp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; font-size: 13px; color: var(--ink-2); }
.pp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.pp-k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted-2); }
.pp-v { display: block; font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -1px; color: var(--ink); }
.pp-rank { display: grid; text-align: right; }
.pp-rank b { font-size: 18px; color: var(--blue); }
.pp-rank span { font-size: 12px; color: var(--muted); }
.pp-note { font-size: 12px; line-height: 1.5; color: var(--muted); }
.pp-warn { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); line-height: 1.5; }
.pp-warn b { color: var(--warn); }
.pp-code-slot:empty, .gate-code-slot:empty { display: none; }
.pp-streak { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.pp-streak-top { display: flex; align-items: center; gap: 6px; }
.pp-streak-top b { color: var(--ink); }
.pp-streak-top .muted { margin-left: auto; font-size: 11.5px; }
.pp-streak-top .material-symbols-outlined { font-size: 20px; color: var(--muted-2); }
.pp-streak-top .material-symbols-outlined.hot { color: var(--warn); font-variation-settings: 'FILL' 1; }
.pp-streak p { margin: 0; font-size: 12px; color: var(--muted); }
.wk-dots { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.wk-dots span { height: 8px; border-radius: 4px; background: var(--bg-soft); border: 1px solid var(--line); }
.wk-dots span.on { background: var(--warn); border-color: var(--warn); }
.pp-parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pp-parts span { display: grid; gap: 2px; padding: 8px 4px; border-radius: 10px; background: var(--bg-soft); font-size: 11px; color: var(--muted); text-align: center; }
.pp-parts b { font-size: 15px; color: var(--ink); }
.pp-sec { margin-bottom: -6px; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted-2); }
.pk-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.pk-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.pk-list .material-symbols-outlined { margin-top: 1px; font-size: 19px; color: var(--blue); }
.pk-list b { display: block; font-size: 13px; color: var(--ink); }
.pk-list div span { display: block; font-size: 12px; line-height: 1.45; color: var(--muted); }
.pk-list em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--ok); white-space: nowrap; }
.pp-recent { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.pp-recent li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.pp-recent li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pp-recent b { color: var(--ok); }
.pp-foot { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.code-form { display: flex; flex-wrap: wrap; gap: 8px; }
.code-form input {
  flex: 1 1 150px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; letter-spacing: .6px; text-transform: uppercase;
}
.code-form input::placeholder { text-transform: none; letter-spacing: .6px; }
@media (max-width: 520px) {
  .pts-chip { padding: 0 10px 0 8px; }
  .pts-chip .pts-lbl { display: none; }
  .pts-pop { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; }
}
/* Bildirim penceresi zile sağdan yaslanıyordu; zilin sağında profil
   fotoğrafı olduğu için telefonda pencere sola taşıp kesiliyordu. Dar
   ekranda ekranın iki kenarına sabitlenir. */
@media (max-width: 640px) {
  .notif-pop { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; max-height: calc(100dvh - 88px); }
}

/* ---------- Panel açılana kadar bekleme ekranı (0028) ---------- */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card {
  width: min(480px, 100%); display: grid; gap: 16px; padding: 32px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
}
.gate-card .logo-chip { justify-self: start; border-radius: 12px; padding: 9px 14px; }
.gate-card .lockup { height: 20px; width: auto; }
.gate-card h1 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.4px; color: var(--ink); }
.gate-card > p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.gate-status { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); }
.gate-status > .material-symbols-outlined { color: var(--warn); }
.gate-status.ok { background: var(--ok-soft); }
.gate-status.ok > .material-symbols-outlined { color: var(--ok); }
.gate-status b { display: block; font-size: 14px; color: var(--ink); }
.gate-status div span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.gate-links { display: flex; flex-wrap: wrap; gap: 10px; }
.gate-foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.gate-foot button { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; }
.linkish.gate-danger, .linkish.danger { color: var(--err); }
@media (max-width: 420px) { .gate-card { padding: 24px 18px; } }
.card.pr-danger { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }

/* ---------- panelden galeri yönetimi (Site İçeriği) ---------- */
.gl-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
/* Boş durum metni tek bir sütuna sıkışıp satır satır kırılmasın. */
.gl-grid > p { grid-column: 1 / -1; margin: 0; }
.gl-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-soft); }
.gl-item img { display: block; width: 100%; height: 120px; object-fit: contain; background: var(--bg-soft); }
.gl-tools { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.gl-tools .btn { flex: 1; padding: 5px 8px; }
.gl-tools .btn[disabled] { opacity: .35; pointer-events: none; }

/* ---- Başvuru formu (portal/basvuru, basvuru.js) ---- */
.ap-body { padding: 10px 0 90px; }
.ap-body .container { max-width: 820px; }
.ap-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 28px; }
.ap-kind { display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 18px 20px; border-radius: 20px;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.ap-kind:hover { border-color: var(--blue-border, var(--blue)); }
.ap-kind[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ap-kind .material-symbols-outlined { font-size: 28px; color: var(--blue); flex: none; }
.ap-kind b { display: block; font-size: 16.5px; font-weight: 800; letter-spacing: -.2px; }
.ap-kind small { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.ap-form { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); padding: 26px; }
.ap-form h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin: 0 0 6px; color: var(--ink); }
.ap-form .ap-lead { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 20px; }
.ap-sec { font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted-2);
  margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.ap-sec:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.ap-form .field textarea { min-height: 110px; }
.ap-help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.ap-count { font-size: 12px; color: var(--muted); float: right; }
.ap-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ap-checks label { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 13.5px; font-weight: 500; cursor: pointer; margin: 0; color: var(--ink); }
.ap-checks input { width: auto; margin: 0; }
.ap-checks label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.ap-kvkk { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.55; margin: 20px 0; color: var(--ink-2); }
.ap-kvkk input { width: auto; margin-top: 3px; }
.ap-done { text-align: center; padding: 40px 20px; }
.ap-done .material-symbols-outlined { font-size: 54px; color: var(--ok, #16a34a); }
.ap-done h2 { margin: 10px 0 8px; }
.ap-err { color: var(--err, #dc2626); font-size: 13.5px; margin: 0 0 12px; }
@media (max-width: 600px) { .ap-form { padding: 20px 16px; } }
.ap-me { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.ap-me > div { flex: 1; min-width: 0; }
.ap-me b { display: block; color: var(--ink); font-size: 14px; }
.ap-me span { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }

/* ---- Sohbet odası (App.sohbetOdasi) ---- */
.sh-list { max-height: 420px; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px 10px; }
.sh-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 85%; }
.sh-msg .avatar { width: 28px; height: 28px; font-size: 11px; flex: none; }
.sh-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.sh-bubble { padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.sh-msg.me .sh-bubble { background: var(--blue); border-color: var(--blue); color: #fff; border-radius: 14px 14px 4px 14px; }
.sh-msg small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.sh-msg.me small { text-align: right; }
.sh-in { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 10px; margin: 0; }
.sh-in textarea { flex: 1; margin: 0; min-height: 44px; resize: vertical; font-size: 13.5px; }
.sh-in .btn { height: 44px; }
.notif-all { display: block; text-align: center; padding: 10px; font-size: 13px; border-top: 1px solid var(--line); }

/* Yönetim menüsünde açılır gruplar */
.app-side nav .grp-btn {
  display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 4px; padding: 9px 12px; border: 0; border-radius: 9px;
  background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2, var(--ink)); cursor: pointer; text-align: left;
}
.app-side nav .grp-btn:hover { background: var(--bg-soft); }
.app-side nav .grp-btn .material-symbols-outlined { font-size: 20px; color: var(--muted); }
.app-side nav .grp-btn .grp-ad { flex: 1; min-width: 0; }
.app-side nav .grp-btn .grp-ok { font-size: 18px; transition: transform .15s; }
.app-side nav .grp-btn[aria-expanded="true"] .grp-ok { transform: rotate(180deg); }
.app-side nav .grp-btn.has-active > .material-symbols-outlined:first-child { color: var(--blue); }
.app-side nav .grp-body { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px 20px; padding-left: 8px; border-left: 1px solid var(--line); }
.app-side nav .grp-body[hidden] { display: none; }
.app-side nav .grp-body a { padding: 8px 10px; font-size: 13.5px; }
.app-side nav .grp-body a .material-symbols-outlined { font-size: 18px; }

/* Salt okunur alan (başka ekip): kilitli tuşlar */
/* Yetkisi olmayan düzenleme tuşlarını görmez; alanlar düz yazı gibi */
.ro-gizli { display: none !important; }
.ro-duz { border-color: transparent !important; background: transparent !important; box-shadow: none !important; padding-left: 0 !important;
  resize: none; pointer-events: none; color: var(--ink) !important; opacity: 1 !important; appearance: none; -webkit-appearance: none; }

/* ============================================================
   Telefon uyumu (tüm panel sayfaları)
   Kök sorun: .app-shell tek sütuna düşünce "1fr" en geniş içeriğe
   göre büyüyor, sayfa ekran dışına taşıyordu. minmax(0, 1fr) ile
   sütun ekrana sığıyor, içerik kendi içinde kırılıyor/kayıyor.
   ============================================================ */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .app-main { width: 100%; max-width: 100vw; overflow-x: clip; }
  .app-content { padding: 18px 14px 48px; }
  .ro-bar { margin: 14px 14px 0 !important; }
  .page-head { margin-bottom: 16px; }
  .spread { flex-wrap: wrap; }
  .card { padding: 16px; border-radius: 16px; }
  .stat-tile { padding: 14px; }
  .stat-tile .v { font-size: 23px; }
  /* uzun metin, adres ve e-postalar kutudan taşmasın */
  /* break-word: sığmayan uzun kelime (adres, e-posta) kırılır ama
     tablo sütunları harf harf daralmaz (anywhere onları eziyordu) */
  .app-content :is(p, td, li, h2, h3, h4, b, small, span, a) { overflow-wrap: break-word; }
  .tbl > thead, .tbl > tbody { min-width: 640px; }
  .tbl td .badge2, .tbl td .btn { white-space: nowrap; }
  .app-content img, .app-content video, .app-content iframe { max-width: 100%; height: auto; }
  /* pencereler telefonda alttan açılan tam genişlik kart */
  .ovl { padding: 0; place-items: end center; }
  .modal, .modal:has(.df-detail), .modal:has(.df-form) {
    width: 100% !important; max-width: 100% !important; max-height: 92dvh; border-radius: 18px 18px 0 0; padding: 20px 16px 28px;
  }
  .modal .grid.c2, .modal .grid.c3 { grid-template-columns: minmax(0, 1fr); }
  #toaster { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
  /* form alanları: iOS büyütmesin (16px) ve tam genişlik */
  .app-content input:not([type=checkbox]):not([type=radio]), .app-content select, .app-content textarea,
  .modal input:not([type=checkbox]):not([type=radio]), .modal select, .modal textarea { font-size: 16px; max-width: 100%; }
  /* düğme sıraları kırılsın */
  .page-head .row, .card > .row, .modal .row { flex-wrap: wrap; }
  .btn.blk, .modal .btn.blk { width: 100%; }
}
@media (max-width: 520px) {
  .app-content { padding: 14px 12px 44px; }
  .page-head h2 { font-size: 20px; }
  .page-head p { font-size: 13.5px; }
  .grid { gap: 10px; }
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-tile .k { font-size: 10.5px; }
  .stat-tile .v { font-size: 21px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  .pts-chip .pts-lbl { display: none; }
  .tbl th, .tbl td { padding: 10px 11px; font-size: 13px; }
}
.modal { position: relative; }
.modal > h3 { padding-right: 36px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--muted); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.modal-x:hover { color: var(--ink); border-color: var(--blue); }
.modal-x .material-symbols-outlined { font-size: 19px; }
@media (max-width: 900px) {
  .df-col { min-height: 0; }
  .df-empty { padding: 6px 2px; }
}

/* Telefonda tablolar: her satır bir kart, hücreler "ETİKET  değer". */
@media (max-width: 640px) {
  .tbl { display: block; border: 0; background: none; overflow: visible; border-radius: 0; }
  .tbl > thead { display: none; }
  .tbl > tbody { display: block; width: 100%; min-width: 0 !important; table-layout: auto; }
  .tbl > tbody > tr { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin-bottom: 10px; }
  .tbl > tbody > tr > td, .tbl th:first-child, .tbl td:first-child {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: auto !important; padding: 7px 0 !important; border: 0 !important; text-align: right; white-space: normal;
  }
  .tbl > tbody > tr > td + td { border-top: 1px dashed var(--line) !important; }
  .tbl > tbody > tr > td[data-label]::before {
    content: attr(data-label); flex: 0 0 auto; max-width: 42%; text-align: left;
    font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted-2);
  }
  .tbl > tbody > tr > td:first-child { justify-content: flex-start; text-align: left; font-weight: 600; }
  .tbl > tbody > tr > td:first-child::before { display: none; }
  .tbl > tbody > tr > td:empty { display: none; }
  .tbl > tbody > tr > td.row { justify-content: flex-end; flex-wrap: wrap; }
  .tbl > tbody > tr > td.row > * { margin: 2px 0 2px 6px; }
  .tbl > tbody > tr > td[colspan] { justify-content: center; text-align: center; }
  .tbl > tbody > tr > td[colspan]::before { display: none; }
  .lb-wrap { border: 0; background: none; overflow: visible; }
  .lb-wrap .tbl { min-width: 0; }
}
@media (max-width: 640px) {
  .tbl > tbody > tr > td:first-child { display: block; }
  .tbl > tbody > tr > td.row { white-space: normal; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  .tbl > tbody > tr > td.row::before { flex-basis: 100%; max-width: none; }
  .tbl > tbody > tr > td.row > * { margin: 0 !important; }
}

/* ============================================================
   Taşma güvenceleri (mobil): bağlantı, e-posta, uzun isim gibi
   boşluksuz metinler kutudan taşıp sağdan kesiliyordu. Metin artık
   kutunun içinde kırılır; rozetler kutuya sığmazsa "…" ile kısalır.
   ============================================================ */
body.app .app-content { overflow-wrap: anywhere; }
body.app .app-content .badge2 { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; line-height: 1.5; }
body.app .app-content .row > :not(.btn):not(button):not(.badge2):not(.chip):not(.avatar):not(input):not(select),
body.app .app-content .spread > :not(.btn):not(button):not(.badge2):not(.chip):not(.avatar):not(input):not(select) { min-width: 0; }
body.app .app-content .card, body.app .app-content article { min-width: 0; max-width: 100%; }
body.app .app-content :is(h1, h2, h3, h4, b, strong, a, small, p, dd, dt, li, label, td, th) { overflow-wrap: anywhere; }
/* Sütunu tanımsız grid'ler (tek sütun "auto") en uzun metne göre genişliyordu */
body.app .app-content .grid:not(.c2):not(.c3):not(.c4) { grid-template-columns: minmax(0, 1fr); }
body.app .app-content .grid > *, body.app .app-content .df-card > *, body.app .app-content .df-top > * { min-width: 0; }
body.app .app-content .df-card { grid-template-columns: minmax(0, 1fr); }
body.app .app-content .df-top { flex-wrap: wrap; }
