/* ==========================================================================
   Cyber Gate yönetim paneli — stiller
   Tasarım: dashboard-sidebar (kenar menü) + toast-save (kaydetme çubuğu)
   ========================================================================== */
:root {
  --background: #060c15;
  --card: #0b1420;
  --card-2: #0f1b2b;
  --popover: #0d1724;
  --foreground: #e9eff6;
  --muted: #8a9ab0;
  --dim: #5f6f84;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --hover: rgba(255, 255, 255, .05);
  --active: rgba(255, 255, 255, .1);
  --tint: rgba(255, 255, 255, .02);
  --input: rgba(255, 255, 255, .035);
  --primary: #048ed3;
  --primary-2: #2aa6e6;
  --primary-soft: rgba(4, 142, 211, .12);
  --primary-fg: #fff;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .12);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, .16);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, .12);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 16px 40px -12px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(4, 142, 211, .28);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark only;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--background); color: var(--foreground); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.ic { width: 16px; height: 16px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.spin { animation: spin 1s linear infinite; }

/* ---------------- Yükleniyor ---------------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; color: var(--muted); gap: 10px; }
.boot__in { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.boot__in .ic { width: 20px; height: 20px; }

/* ==========================================================================
   YERLEŞİM (SidebarNavPreview)
   ========================================================================== */
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; background: var(--card); }
.sb-wrap {
  width: 260px; flex-shrink: 0; height: 100%; overflow: hidden; background: color-mix(in srgb, var(--card) 50%, var(--background));
  border-right: 1px solid var(--border); transition: width .3s ease-in-out, opacity .3s ease-in-out;
}
.app.is-collapsed .sb-wrap { width: 0; opacity: 0; border-right: 0; }
.sb { width: 260px; height: 100%; display: flex; flex-direction: column; padding: 12px; }

/* Çalışma alanı seçici (WorkspaceSwitcher) */
.ws { position: relative; }
.ws__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 8px; margin-bottom: 16px;
  border-radius: 8px; transition: background .15s; user-select: none; text-align: left;
}
.ws__btn:hover { background: var(--hover); }
.ws__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ws__logo {
  width: 32px; height: 32px; border-radius: 6px; background: var(--primary); color: var(--primary-fg); flex-shrink: 0;
  display: grid; place-items: center; font-weight: 600; font-size: 13px; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); overflow: hidden;
}
.ws__logo img { width: 24px; height: 24px; object-fit: contain; }
.ws__txt { display: flex; flex-direction: column; overflow: hidden; }
.ws__name { font-size: 13px; font-weight: 500; line-height: 1; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.ws__plan { font-size: 11px; color: var(--muted); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.ws__btn .chev { width: 16px; height: 16px; color: color-mix(in srgb, var(--muted) 50%, transparent); transition: color .15s; }
.ws__btn:hover .chev { color: color-mix(in srgb, var(--foreground) 70%, transparent); }
.ws__shield { position: fixed; inset: 0; z-index: 40; }
.ws__menu {
  position: absolute; top: 52px; left: 0; width: 100%; z-index: 50; background: var(--popover); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow); padding: 4px 0; display: flex; flex-direction: column; gap: 2px; animation: popIn .1s ease-out;
}
.ws__me { padding: 8px 12px 10px; display: flex; gap: 10px; align-items: center; }
.ws__me .avatar { width: 30px; height: 30px; }
.ws__me b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws__me small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.ws__opt {
  margin: 0 4px; padding: 8px 12px; font-size: 13px; border-radius: 6px; color: color-mix(in srgb, var(--foreground) 80%, transparent);
  display: flex; align-items: center; gap: 8px; text-align: left; transition: background .15s;
}
.ws__opt:hover { background: var(--hover); color: var(--foreground); text-decoration: none; }
.ws__opt--muted { color: var(--muted); }
.ws__sep { height: 1px; background: var(--border); margin: 4px 8px; }

/* Menü öğeleri (NavItem) */
.nav-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-heading { padding: 0 10px; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--muted) 55%, transparent); }
.nav-node { display: flex; flex-direction: column; width: 100%; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 7px 10px; border-radius: 6px;
  color: var(--muted); transition: background .2s, color .2s; user-select: none; text-align: left;
}
.nav-item:hover { background: var(--hover); color: color-mix(in srgb, var(--foreground) 90%, transparent); }
.nav-item.is-active { background: var(--active); color: var(--foreground); font-weight: 500; }
.nav-item__l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-item__l .ic { color: color-mix(in srgb, var(--muted) 70%, transparent); transition: color .2s; }
.nav-item:hover .nav-item__l .ic { color: color-mix(in srgb, var(--foreground) 70%, transparent); }
.nav-item.is-active .nav-item__l .ic { color: var(--foreground); }
.nav-item__t { font-size: 13px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item__r { display: flex; align-items: center; gap: 8px; }
.kbd {
  display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 6px; font: 500 10px var(--mono);
  color: color-mix(in srgb, var(--muted) 70%, transparent); background: color-mix(in srgb, var(--background) 50%, transparent);
  border: 1px solid var(--border); border-radius: 4px;
}
.nav-item .kbd { display: none; }
.nav-item:hover .kbd { display: inline-flex; }
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  font-size: 10px; font-weight: 600; border-radius: 999px; background: var(--primary-soft); color: var(--primary-2);
}
.badge--warn { background: var(--warning-soft); color: var(--warning); }
.nav-item .chev { width: 14px; height: 14px; color: color-mix(in srgb, var(--muted) 50%, transparent); transition: transform .2s; }
.nav-node.is-open > .nav-item .chev { transform: rotate(90deg); }
.nav-kids { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .3s ease-in-out, opacity .3s ease-in-out; }
.nav-node.is-open > .nav-kids { grid-template-rows: 1fr; opacity: 1; }
.nav-kids__in { overflow: hidden; min-height: 0; position: relative; display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.nav-kids__line { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border); }
.nav-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
.sb-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }

/* Sağ taraf */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--tint); transition: all .3s; }
.topbar {
  height: 56px; flex-shrink: 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--card); gap: 12px;
}
.topbar__l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.icon-btn { padding: 6px; border-radius: 6px; color: var(--muted); transition: background .15s, color .15s; display: inline-flex; }
.icon-btn:hover { background: var(--hover); color: var(--foreground); }
.icon-btn .ic { width: 18px; height: 18px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); min-width: 0; }
.crumbs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs b { font-weight: 500; color: var(--foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__r { display: flex; align-items: center; gap: 12px; }
.search-pill {
  width: 256px; height: 32px; border-radius: 6px; background: var(--hover); display: flex; align-items: center; gap: 8px; padding: 0 10px;
  color: color-mix(in srgb, var(--muted) 80%, transparent); font-size: 13px; transition: background .15s;
}
.search-pill:hover { background: var(--active); }
.search-pill .kbd { margin-left: auto; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); border: 1px solid rgba(4, 142, 211, .25);
  display: grid; place-items: center; overflow: hidden; font-size: 12px; font-weight: 600; color: var(--primary-2); flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.content { flex: 1; overflow-y: auto; padding: 24px 32px 140px; scroll-padding-top: 16px; }
.content__in { max-width: 1040px; margin: 0 auto; }

/* ---------------- Mobil: kenar menü çekmece olarak açılır ---------------- */
.sb-scrim { display: none; }
@media (max-width: 860px) {
  .sb-wrap { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; box-shadow: var(--shadow); background: var(--card); }
  .app:not(.is-mobile-open) .sb-wrap { width: 0; opacity: 0; border-right: 0; }
  .app.is-mobile-open .sb-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .45); animation: fadeIn .2s; }
  .search-pill { width: 36px; padding: 0 9px; }
  .search-pill span, .search-pill .kbd { display: none; }
  .content { padding: 18px 16px 140px; }
  .crumbs .crumbs__ws, .crumbs .crumbs__sep { display: none; }
}

/* ==========================================================================
   ARAMA (komut paleti)
   ========================================================================== */
.palette { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 15vh 16px 0; background: color-mix(in srgb, var(--background) 40%, transparent); backdrop-filter: blur(4px); animation: fadeIn .15s; }
.palette__shield { position: absolute; inset: 0; }
.palette__box { position: relative; width: 100%; max-width: 576px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .55); overflow: hidden; animation: popIn .2s ease-out; }
.palette__row { display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--border); }
.palette__row > .ic { width: 18px; height: 18px; color: color-mix(in srgb, var(--muted) 70%, transparent); margin-right: 12px; }
.palette__input { flex: 1; background: transparent; border: 0; outline: none; padding: 16px 0; font-size: 14px; }
.palette__input::placeholder { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.palette__row .kbd { margin-left: 8px; cursor: pointer; }
.palette__row .icon-btn { margin-left: 12px; }
.palette__list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette__empty { padding: 32px 8px; display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 13px; font-weight: 500; }
.palette__empty .ic { width: 24px; height: 24px; color: color-mix(in srgb, var(--muted) 35%, transparent); margin-bottom: 8px; }
.palette__item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; text-align: left; color: var(--muted); }
.palette__item.is-sel, .palette__item:hover { background: var(--hover); color: var(--foreground); }
.palette__item b { font-weight: 500; color: var(--foreground); font-size: 13px; }
.palette__item small { margin-left: auto; font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
.palette__group { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }

/* ==========================================================================
   KAYDETME ÇUBUĞU (ToastSave)
   ========================================================================== */
.toast-save {
  position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translateX(-50%) translateY(0);
  display: inline-flex; height: 40px; align-items: center; justify-content: center; overflow: hidden; border-radius: 999px;
  background: color-mix(in srgb, var(--background) 95%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 16px -4px rgba(0, 0, 0, .3);
  transition: width .38s cubic-bezier(.34, 1.4, .64, 1), opacity .2s, transform .3s cubic-bezier(.34, 1.4, .64, 1);
}
.toast-save.is-hidden { opacity: 0; transform: translateX(-50%) translateY(20px); pointer-events: none; }
.toast-save__in { display: flex; height: 100%; align-items: center; justify-content: space-between; padding: 0 12px; white-space: nowrap; }
.toast-save__msg { display: flex; align-items: center; gap: 8px; color: var(--foreground); }
.toast-save__msg .ic { width: 18px; height: 18px; color: color-mix(in srgb, var(--foreground) 80%, transparent); }
.toast-save__msg .spin { width: 18px; height: 18px; }
.toast-save__text { font-size: 13px; line-height: 1.2; white-space: nowrap; }
.toast-save__ok { padding: 2px; border-radius: 99px; background: var(--success-soft); border: 1px solid rgba(16, 185, 129, .25); display: flex; }
.toast-save__ok .ic { width: 14px; height: 14px; color: var(--success); }
.toast-save__acts { margin-left: 8px; display: flex; align-items: center; gap: 8px; overflow: hidden; transition: opacity .15s; }
.toast-save[data-state="loading"] .toast-save__acts, .toast-save[data-state="success"] .toast-save__acts { display: none; }
.ts-btn { height: 28px; padding: 0 12px; border-radius: 99px; font-size: 13px; transition: background .15s, filter .15s; white-space: nowrap; }
.ts-btn--ghost:hover { background: var(--hover); }
.ts-btn--primary {
  color: #fff; font-weight: 500; background: linear-gradient(to bottom, #1aa3e8, #048ed3);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, .25);
}
.ts-btn--primary:hover { filter: brightness(1.1); }

/* ==========================================================================
   SAYFA İÇERİKLERİ
   ========================================================================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; max-width: 680px; white-space: pre-wrap; }
.page-head__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.card + .card { margin-top: 16px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card__head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.card__head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.card__body { padding: 8px 20px 16px; }
.card__body--flush { padding: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-2 .card + .card { margin-top: 0; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-height: 128px; }
.stat__k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat__v { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.stat__s { font-size: 12.5px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 8px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border-strong); background: var(--card); transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn .ic { width: 15px; height: 15px; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: #0679b4; }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); border-color: rgba(248, 113, 113, .4); }
.btn--sm { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.btn--icon { width: 28px; padding: 0; justify-content: center; }
.btn--ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn--ghost:hover { color: var(--foreground); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.note { padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.6; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; white-space: pre-wrap; }
.note .ic { margin-top: 2px; }
.note--info { background: var(--primary-soft); border: 1px solid rgba(4, 142, 211, .22); color: color-mix(in srgb, var(--foreground) 85%, transparent); }
.note--warn { background: var(--warning-soft); border: 1px solid rgba(251, 191, 36, .3); }
.note--warn .ic { color: var(--warning); }
.note--danger { background: var(--danger-soft); border: 1px solid rgba(248, 113, 113, .35); }
.note--danger .ic { color: var(--danger); }
.note__acts { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Tablolar / listeler */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 20px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--tint); }
.table .num { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.table .acts { text-align: right; white-space: nowrap; }
.table .acts .btn + .btn { margin-left: 6px; }
.table-wrap { overflow-x: auto; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; background: var(--hover); color: var(--muted); white-space: nowrap; }
.pill--owner { background: rgba(168, 85, 247, .15); color: #c084fc; }
.pill--admin { background: var(--primary-soft); color: var(--primary-2); }
.pill--editor { background: var(--success-soft); color: #34d399; }
.pill--live { background: var(--success-soft); color: #34d399; }
.pill--warn { background: var(--warning-soft); color: var(--warning); }
.pill--danger { background: var(--danger-soft); color: var(--danger); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .avatar { width: 28px; height: 28px; font-size: 11px; }
.user-cell b { font-weight: 500; display: block; }
.user-cell small { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px 20px; }
.form-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.form-row label.grow { flex: 1; min-width: 220px; }
.changes { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-cell { display: flex; align-items: center; gap: 12px; }
.sec-cell .ic { color: var(--muted); }
.sec-cell b { font-weight: 500; }

/* ==========================================================================
   AYAR ALANLARI (config düzenleyici)
   ========================================================================== */
.field { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 6px 20px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.field:last-child { border-bottom: 0; }
.field__label { padding-top: 8px; font-weight: 500; font-size: 13px; }
.field__label code { display: block; font: 400 11px var(--mono); color: var(--dim); margin-top: 3px; }
.field__control { min-width: 0; }
.field__help { grid-column: 2; margin-top: -2px; font-size: 12px; color: var(--dim); white-space: pre-wrap; line-height: 1.55; }
.field.is-changed .field__label::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warning); margin-right: 7px; vertical-align: middle; }
.field.is-flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { background: var(--primary-soft); } 100% { background: transparent; } }
.inp, .field input[type=text], .field input[type=number], .field input[type=date], .field input[type=datetime-local], .field textarea, .field select, .prim-row input[type=text], .prim-row textarea {
  width: 100%; min-height: 36px; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--input); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 13.5px;
}
select.inp { padding-right: 28px; }
textarea { resize: vertical; min-height: 72px; line-height: 1.55; }
.inp:focus, .field input:focus, .field textarea:focus, .field select:focus, .prim-row input:focus, .prim-row textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.field input[type=date], .field input[type=datetime-local] { max-width: 260px; }
.row { display: flex; gap: 8px; align-items: center; }
.color { width: 42px; height: 36px; padding: 3px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--input); flex-shrink: 0; cursor: pointer; }
.thumb { width: 56px; height: 40px; object-fit: contain; border-radius: 6px; background: var(--card-2); border: 1px solid var(--border); flex-shrink: 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; padding-top: 6px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 38px; height: 22px; border-radius: 999px; background: var(--active); border: 1px solid var(--border-strong); position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + span { box-shadow: var(--ring); }
.switch em { font-style: normal; color: var(--muted); font-size: 13px; }

.group { margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; background: var(--tint); }
.group > summary { list-style: none; cursor: pointer; padding: 11px 14px; display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 13.5px; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary > .ic { width: 14px; height: 14px; color: var(--dim); transition: transform .2s; }
.group[open] > summary > .ic { transform: rotate(90deg); }
.group > summary code { font: 400 11px var(--mono); color: var(--dim); }
.group > summary .count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; }
.group__body { padding: 0 14px 12px; }
.group__help { font-size: 12px; color: var(--dim); white-space: pre-wrap; line-height: 1.55; padding: 0 0 6px; }
.item { margin: 8px 0; border: 1px solid var(--border); border-radius: 9px; background: var(--card); }
.item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; }
.item > summary::-webkit-details-marker { display: none; }
.item > summary > .ic { width: 14px; height: 14px; color: var(--dim); transition: transform .2s; }
.item[open] > summary > .ic { transform: rotate(90deg); }
.item__no { font: 11.5px var(--mono); color: var(--dim); min-width: 20px; }
.item__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 13.5px; }
.item__tools { display: flex; gap: 2px; }
.item__body { padding: 0 14px 10px; border-top: 1px solid var(--border); }
.item__comment { font: 12px var(--mono); color: var(--dim); white-space: pre-wrap; padding: 10px 0 0; }
.prim-row { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.prim-row > .field__control { flex: 1; }
.add-row { display: flex; gap: 8px; margin-top: 10px; }
.raw { font: 12.5px var(--mono); opacity: .8; }
.hidden-by-search { display: none !important; }
.section-search { margin-bottom: 8px; }
@media (max-width: 760px) {
  .field { grid-template-columns: 1fr; }
  .field__help { grid-column: 1; }
}

/* Bildirimler */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast {
  padding: 11px 14px; border-radius: 10px; background: var(--popover); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  font-size: 13px; display: flex; gap: 10px; align-items: flex-start; animation: popIn .15s ease-out; white-space: pre-wrap;
}
.toast .ic { margin-top: 1px; }
.toast--err { border-color: rgba(248, 113, 113, .45); }
.toast--err .ic { color: var(--danger); }
.toast--ok .ic { color: var(--success); }

/* Onay penceresi */
.dialog { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .5); animation: fadeIn .15s; }
.dialog__box { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 20px; animation: popIn .15s ease-out; }
.dialog__box h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.dialog__box p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.dialog__box .inp { margin: -6px 0 18px; }
.dialog__acts { margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* Kod önizleme */
.code { font: 12px/1.55 var(--mono); background: var(--card-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; max-height: 420px; overflow: auto; white-space: pre; margin: 0; }

/* ==========================================================================
   GİRİŞ SAYFASI
   ========================================================================== */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.login::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 80%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(4, 142, 211, .16), transparent 70%);
}
.login__card { position: relative; width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 32px 28px 24px; text-align: center; }
.login__logo { width: 52px; height: 52px; border-radius: 12px; background: var(--primary); display: grid; place-items: center; margin: 0 auto 18px; box-shadow: 0 8px 24px -8px rgba(4, 142, 211, .6); }
.login__logo img { width: 36px; height: 36px; object-fit: contain; }
.login__card h1 { margin: 0; font-size: 19px; font-weight: 600; }
.login__card > p { margin: 8px 0 24px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.gbtn {
  width: 100%; height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 10px;
  background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 500; font-size: 14px; transition: background .15s, box-shadow .15s;
}
.gbtn:hover { background: #f8faff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); text-decoration: none; }
.gbtn svg { width: 18px; height: 18px; }
.gbtn.is-busy { pointer-events: none; opacity: .75; }
.login__err { margin: 0 0 16px; text-align: left; }
.login__foot { margin-top: 20px; font-size: 11.5px; color: var(--dim); line-height: 1.6; }

/* ==========================================================================
   İÇERİK ODAKLI EKRANLAR (v65)
   ========================================================================== */
.nowrap { white-space: nowrap; }
.note__main { flex: 1; min-width: 0; }
.note--boot { max-width: 520px; }
.ws__meinfo { min-width: 0; }
.flip-x .ic { transform: rotate(-90deg); }
.flip { transform: rotate(180deg); }
.row--wrap { flex-wrap: wrap; margin-top: 14px; }
.btn--danger-solid { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn--danger-solid:hover { background: #b91c1c; }
.inp--sm { width: auto; min-height: 30px; padding: 4px 26px 4px 9px; }
.content__in { max-width: 1120px; }

/* Geri bağlantısı */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.back:hover { color: var(--foreground); text-decoration: none; }
.back .ic { width: 14px; height: 14px; }

/* Form ızgarası */
.card__body--form { padding: 18px 20px 20px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.fld { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld--half { grid-column: auto; }
.fld__label { font-size: 13px; font-weight: 500; color: var(--foreground); }
.fld__hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.fld__hint.is-err { color: var(--danger); }
.fld .inp, .fld textarea.inp { width: 100%; }
.inp { font-size: 14px; }
textarea.inp { min-height: 64px; overflow: hidden; }
.inp--date { max-width: 260px; }
.fgroup { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 14px; margin: 0; }
.fgroup legend { padding: 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
@media (max-width: 640px) { .fgrid { grid-template-columns: 1fr; } .fld--half { grid-column: 1 / -1; } }

/* Açık / kapalı anahtarı */
.sw { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; user-select: none; position: relative; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw__track { flex-shrink: 0; width: 38px; height: 22px; border-radius: 999px; background: var(--active); border: 1px solid var(--border-strong); position: relative; transition: background .2s; margin-top: 1px; }
.sw__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.sw input:checked + .sw__track { background: var(--primary); border-color: var(--primary); }
.sw input:checked + .sw__track::after { transform: translateX(16px); background: #fff; }
.sw input:focus-visible + .sw__track { box-shadow: var(--ring); }
.sw__text b { display: block; font-weight: 500; font-size: 13.5px; }
.sw__text small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Gelişmiş ayarlar */
.adv { grid-column: 1 / -1; margin-top: 18px; border: 1px dashed var(--border-strong); border-radius: 10px; }
.adv > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--muted); }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary small { font-weight: 400; color: var(--dim); margin-left: auto; font-size: 12px; }
.adv[open] > summary { color: var(--foreground); border-bottom: 1px dashed var(--border); }
.adv > .fgrid, .adv > div:not(.fgrid) { padding: 14px; }
.adv--top { margin: 0 0 18px; background: var(--card); }
.adv__rest { padding-top: 0 !important; }

/* Görsel alanı */
.img-field { display: flex; gap: 12px; align-items: flex-start; }
.img-field__prev { width: 88px; height: 88px; flex-shrink: 0; border-radius: 10px; border: 1px dashed var(--border-strong); background: var(--card-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; color: var(--dim); font-size: 11px; transition: border-color .15s; }
.img-field__prev:hover { border-color: var(--primary); }
.img-field__prev img { width: 100%; height: 100%; object-fit: cover; }
.img-field__prev .ic { width: 20px; height: 20px; }
.img-field__side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.img-field__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.img-field--big { flex-direction: column; align-items: stretch; }
.img-field:not(.img-field--big) .img-field__prev { width: 104px; height: 104px; }
.img-field--big .img-field__prev { width: 100%; height: auto; aspect-ratio: 16 / 10; }
.img-field--big .img-field__prev img { object-fit: cover; }
.img-field__side .inp { font-size: 12.5px; color: var(--muted); width: 100%; }

/* Görsel seçici */
.picker { position: fixed; inset: 0; z-index: 97; display: grid; place-items: center; padding: 16px; }
.picker__shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); animation: fadeIn .15s; }
.picker__box { position: relative; width: 100%; max-width: 880px; max-height: 86vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); animation: popIn .15s ease-out; }
.picker__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.picker__head h3 { margin: 0; font-size: 16px; }
.picker__bar { display: flex; gap: 8px; padding: 8px 16px 12px; border-bottom: 1px solid var(--border); }
.picker__bar .inp:first-child { flex: 1; }
.picker__bar select { width: auto; max-width: 45%; }
.picker__grid { overflow: auto; padding: 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.picker__item { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-2); text-align: left; transition: border-color .15s, transform .15s; }
.picker__item:hover { border-color: var(--primary); transform: translateY(-1px); }
.picker__item.is-sel { border-color: var(--primary); box-shadow: var(--ring); }
.picker__item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; background: var(--background); }
.picker__item span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__grid .empty { grid-column: 1 / -1; }
.picker__foot { padding: 10px 16px 14px; font-size: 12px; color: var(--dim); border-top: 1px solid var(--border); }

/* Paragraflar */
.paras { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.paras__list { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.paras__row { display: flex; gap: 8px; align-items: flex-start; }
.paras__no { width: 22px; flex-shrink: 0; padding-top: 9px; font: 12px var(--mono); color: var(--dim); text-align: right; }
.paras__row textarea { flex: 1; }
.paras__tools { display: flex; flex-direction: column; gap: 2px; }
.paras__empty { font-size: 13px; color: var(--muted); padding: 4px 0; }

/* Galeri */
.gal__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.gal__item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--card-2); display: grid; place-items: center; }
.gal__item img { width: 100%; height: 100%; object-fit: cover; }
.gal__miss .ic { width: 22px; height: 22px; color: var(--dim); }
.gal__tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.gal__item:hover .gal__tools, .gal__item:focus-within .gal__tools { opacity: 1; }
.gal__tools .btn { background: color-mix(in srgb, var(--card) 85%, transparent); }
.gal__add { aspect-ratio: 1; border-radius: 10px; border: 1px dashed var(--border-strong); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; }
.gal__add:hover { border-color: var(--primary); color: var(--foreground); }

/* Nesne listesi (akordeon) */
.olist { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.olist__items { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.ocard { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--card-2); }
.ocard > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; }
.ocard > summary::-webkit-details-marker { display: none; }
.ocard__title { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; font-size: 13.5px; }
.ocard__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ocard__title .ic { width: 14px; height: 14px; color: var(--dim); transition: transform .2s; flex-shrink: 0; }
.ocard[open] .ocard__title .ic { transform: rotate(90deg); }
.ocard__actions { display: flex; gap: 2px; flex-shrink: 0; }
.ocard__body { padding: 12px 14px 14px; border-top: 1px solid var(--border); }

/* Yan düzenleme paneli */
.drawer { position: fixed; inset: 0; z-index: 85; }
.drawer__shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: fadeIn .18s; }
.drawer__box { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); display: flex; flex-direction: column; background: var(--card); border-left: 1px solid var(--border); box-shadow: var(--shadow); animation: slideIn .22s ease-out; }
.drawer.is-leaving .drawer__box { animation: slideOut .18s ease-in forwards; }
.drawer.is-leaving .drawer__shade { opacity: 0; transition: opacity .18s; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideOut { to { transform: translateX(40px); opacity: 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--border); }
.drawer__head h2 { margin: 0; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.drawer__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }

/* Araç çubuğu, sekmeler */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .inp:first-child { flex: 1; min-width: 200px; }
.toolbar select { width: auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); font-size: 13px; font-weight: 500; transition: all .15s; }
.tab:hover { color: var(--foreground); background: var(--hover); }
.tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab small { font-size: 11px; opacity: .75; }
.cat-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); }
.cat-bar .fld__label { white-space: nowrap; }
@media (max-width: 640px) { .cat-bar { grid-template-columns: 1fr auto auto; } .cat-bar .fld__label { grid-column: 1 / -1; } .cat-bar .inp { grid-column: 1 / -1; } }
.add-bar { display: flex; justify-content: center; margin: 14px 0 6px; }
.list-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; }
.sub-head { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 10px; flex-wrap: wrap; }
.sub-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.sub-head__hint { font-size: 12.5px; color: var(--muted); flex: 1; }

/* Haber kartları */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.icard { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.icard:hover, .icard:focus-visible { border-color: rgba(4, 142, 211, .5); transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6); }
.icard__img { aspect-ratio: 16 / 9; background: var(--card-2); display: grid; place-items: center; color: var(--dim); overflow: hidden; }
.icard__img img { width: 100%; height: 100%; object-fit: cover; }
.icard__img .ic, .thumbbox .ic { width: 26px; height: 26px; }
.icard__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.icard__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.icard h3 { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.icard p { margin: 0; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Etkinlik satırları */
.rows { display: flex; flex-direction: column; gap: 10px; }
.irow { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.irow:hover, .irow:focus-visible { border-color: rgba(4, 142, 211, .5); background: var(--card-2); }
.irow__img { width: 96px; height: 64px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--card-2); display: grid; place-items: center; color: var(--dim); }
.irow__img img { width: 100%; height: 100%; object-fit: cover; }
.irow__body { flex: 1; min-width: 0; }
.irow__body h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irow__meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.irow__meta .ic { width: 13px; height: 13px; }
.irow__end { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .irow { flex-wrap: wrap; } .irow__img { width: 72px; height: 52px; } .irow__end { width: 100%; justify-content: flex-start; padding-left: 86px; } }

/* Düzenleme sayfası: iki sütun */
.edit-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.edit-cols .card + .card { margin-top: 16px; }
.edit-side { position: sticky; top: 0; }
@media (max-width: 980px) { .edit-cols { grid-template-columns: 1fr; } .edit-side { position: static; } }
.idrow { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--input); overflow: hidden; }
.idrow:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.idrow__pre { padding: 0 2px 0 10px; display: flex; align-items: center; font: 12.5px var(--mono); color: var(--dim); }
.idrow .inp { border: 0; box-shadow: none !important; background: transparent; padding-left: 2px; font: 12.5px var(--mono); }

/* Duyuru / soru kartları */
.acard { border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 12px 16px 16px; margin-bottom: 12px; }
.acard__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.acard__no { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.acard__tools { display: flex; gap: 2px; }

/* Kişi kartları */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.pcard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); cursor: pointer; transition: border-color .15s, transform .15s; min-width: 0; }
.pcard:hover, .pcard:focus-visible { border-color: rgba(4, 142, 211, .5); transform: translateY(-2px); }
.pcard__photo { width: 84px; height: 84px; border-radius: 16px; overflow: hidden; background: var(--primary-soft); color: var(--primary-2); display: grid; place-items: center; font-weight: 600; font-size: 22px; margin-bottom: 6px; }
.pcard__photo img { width: 100%; height: 100%; object-fit: cover; }
.pcard__name { font-size: 13.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.pcard__role { font-size: 12px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.pcard__tools { position: absolute; top: 6px; right: 6px; left: 6px; display: flex; justify-content: space-between; opacity: 0; transition: opacity .15s; pointer-events: none; }
.pcard:hover .pcard__tools, .pcard:focus-within .pcard__tools { opacity: 1; pointer-events: auto; }
.pcard__tools .btn { background: color-mix(in srgb, var(--card) 88%, transparent); }
.pcard__tools .btn:first-child { margin-right: auto; }
.pcard__tools .btn + .btn { margin-left: 2px; }
.pcard--add { border-style: dashed; color: var(--muted); justify-content: center; min-height: 160px; font-size: 13px; gap: 8px; }
.pcard--add .ic { width: 22px; height: 22px; }
.pcard--add:hover { color: var(--foreground); }
@media (hover: none) { .pcard__tools, .gal__tools { opacity: 1; pointer-events: auto; } }
.subteam { margin-top: 16px; }

/* Takım kartları */
.cards--teams { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tcard__logo { height: 120px; background: var(--card-2); display: grid; place-items: center; color: var(--dim); }
.tcard__logo img { max-width: 70%; max-height: 84px; object-fit: contain; }
.tcard__tools { position: absolute; top: 8px; right: 8px; left: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.tcard__tools .btn:last-child { margin-left: auto; }
.tcard__tools .btn { background: color-mix(in srgb, var(--card) 88%, transparent); }
.tcard:hover .tcard__tools, .tcard:focus-within .tcard__tools { opacity: 1; }
@media (hover: none) { .tcard__tools { opacity: 1; } }

/* Boş durum */
.empty-big { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 20px; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--muted); text-align: center; }
.empty-big__ic .ic { width: 32px; height: 32px; color: var(--dim); }
.empty-big p { margin: 0; }

/* Genel bakış */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.quick__item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); text-align: left; transition: border-color .15s, transform .15s; }
.quick__item:hover { border-color: rgba(4, 142, 211, .5); transform: translateY(-2px); }
.quick__ic { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-2); display: grid; place-items: center; flex-shrink: 0; }
.quick__ic .ic { width: 18px; height: 18px; }
.quick__item b { display: block; font-size: 13.5px; font-weight: 600; }
.quick__item small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats .card { margin: 0; text-align: left; min-height: 0; cursor: pointer; transition: border-color .15s; }
.stats .card:hover { border-color: rgba(4, 142, 211, .5); }
.stats .stat__s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Genel (yedek) düzenleyici: sade görünüm */
.adv__rest .field { grid-template-columns: 200px minmax(0, 1fr); }
@media (max-width: 760px) { .adv__rest .field { grid-template-columns: 1fr; } }

/* Mobil */
@media (max-width: 640px) {
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head__acts { justify-content: flex-start; }
  .card__body--form { padding: 14px; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer__box { width: 100%; }
  .toast-save { bottom: 14px; max-width: calc(100% - 20px); }
  .toast-save .toast-save__text { font-size: 12.5px; }
}
@media (hover: none) { .pcard { padding-top: 46px; } .pcard--add { padding-top: 14px; } }
@media (max-width: 640px) {
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .quick__item { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .quick__item small { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats .stat__s { display: none; }
  .stats .card { padding: 14px; min-height: 0; }
}

/* ==========================================================================
   AÇILIR MENÜLER — ana sitenin "Kurumsal" menüsüyle aynı tasarım (v66)
   ========================================================================== */
:root { --dd-item: rgba(7, 17, 29, .35); --dd-item-hover: #13263d; --dd-border: rgba(150, 190, 225, .12); --dd-bg: #0e1d30; --dd-text: #9aabbf; --dd-text-on: #eef3f8; }

/* Seçim kutusu düğmesi */
.dd { position: relative; }
.dd__native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; left: 0; bottom: 0; }
.dd__btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.dd__btn:disabled { opacity: .5; cursor: not-allowed; }
.dd__val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dd__chev { display: grid; place-items: center; flex-shrink: 0; color: var(--muted); transition: transform .2s ease-in-out; }
.dd__chev .ic { width: 16px; height: 16px; }
.dd.is-open > .dd__btn { border-color: var(--primary); background: rgba(122, 169, 255, .08); color: var(--foreground); }
.dd.is-open > .dd__btn .dd__chev { transform: rotate(180deg); color: var(--foreground); }
.dd--sm { display: inline-block; }
.dd--sm .dd__btn { width: auto; min-width: 128px; min-height: 30px; padding: 4px 10px; font-size: 13px; }
.toolbar .dd, .picker__bar .dd { width: auto; min-width: 190px; }
.inp--date + .dd, .fld--half .dd { width: 100%; }

/* Yazarken öneri listesi olan alanlar */
.dd-field { position: relative; }
.dd-field .dd__input { padding-right: 38px; }
.dd__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); transition: color .15s, background .15s; }
.dd__toggle:hover { color: var(--foreground); background: var(--hover); }
.dd__toggle .ic { width: 16px; height: 16px; transition: transform .2s ease-in-out; }
.dd-field.is-open .dd__toggle .ic { transform: rotate(180deg); }
.dd-field.is-open .dd__input { border-color: var(--primary); }

/* Menü (sayfanın üstünde açılır) */
.ddm {
  position: fixed; z-index: 120; border-radius: 10px; overflow: hidden;
  background: var(--dd-bg); border: 2px solid var(--dd-border);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .45), 0 4px 6px -4px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(-10px) scale(.95); transform-origin: top center;
  transition: opacity .2s ease-out, transform .2s ease-out;
}
.ddm.is-up { transform: translateY(10px) scale(.95); transform-origin: bottom center; }
.ddm[data-state="open"] { opacity: 1; transform: none; }
.ddm__list { overflow-y: auto; overscroll-behavior: contain; }
.ddm__item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; text-align: left;
  font-size: 14px; font-weight: 500; color: var(--dd-text); white-space: nowrap;
  background: var(--dd-item); border-bottom: 2px solid var(--dd-border);
  transition: background-color .15s, color .15s;
}
.ddm__item:last-child { border-bottom: 0; }
.ddm__item:hover, .ddm__item.is-hl { background: var(--dd-item-hover); color: var(--dd-text-on); }
.ddm__item.is-active { color: var(--primary-2); }
.ddm__t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ddm__item small { margin-left: auto; padding-left: 12px; font: 400 11.5px var(--mono); color: var(--dim); overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.ddm__check { margin-left: auto; display: grid; color: var(--primary-2); }
.ddm__item small + .ddm__check { margin-left: 8px; }
.ddm__check .ic { width: 16px; height: 16px; }
.ddm__empty { padding: 12px 14px; font-size: 13px; color: var(--muted); white-space: normal; }
/* Öğeler sırayla soldan kayarak gelir */
.ddm__item > * { transition: opacity .2s ease-out, transform .2s ease-out; transition-delay: calc(var(--i, 0) * .03s); }
.ddm[data-state="closed"] .ddm__item > * { opacity: 0; transform: translateX(-20px); transition: none; }

/* Sol üstteki hesap menüsü de aynı tasarımda */
.ws__menu {
  top: calc(100% - 8px); padding: 0; gap: 0; border-radius: 10px; overflow: hidden;
  background: var(--dd-bg); border: 2px solid var(--dd-border);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .45), 0 4px 6px -4px rgba(0, 0, 0, .45);
  animation: none; opacity: 0; transform: translateY(-10px) scale(.95); transform-origin: top center;
  transition: opacity .2s ease-out, transform .2s ease-out;
}
.ws__menu[data-state="open"] { opacity: 1; transform: none; }
.ws__me { background: var(--dd-item); border-bottom: 2px solid var(--dd-border); padding: 12px 14px; }
.ws__sep { display: none; }
.ws__opt {
  margin: 0; border-radius: 0; padding: 10px 14px; gap: 10px; font-size: 14px; font-weight: 500;
  color: var(--dd-text); background: var(--dd-item); border-bottom: 2px solid var(--dd-border);
  transition: background-color .15s, color .15s;
}
.ws__opt:last-child { border-bottom: 0; }
.ws__opt .ic { color: var(--primary-2); }
.ws__opt:hover, .ws__opt:focus-visible { background: var(--dd-item-hover); color: var(--dd-text-on); outline: none; }
.ws__opt--muted .ic { color: var(--muted); }
.ws__opt > * { transition: opacity .2s ease-out, transform .2s ease-out; transition-delay: calc(var(--i, 0) * .03s); }
.ws__menu[data-state="closed"] .ws__opt > * { opacity: 0; transform: translateX(-20px); transition: none; }
.ws__opt { position: relative; }
.ws__btn[aria-expanded="true"] { background: rgba(122, 169, 255, .08); }
.ws__btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.ws__btn .chev { transition: transform .2s ease-in-out, color .15s; }
@media (prefers-reduced-motion: reduce) {
  .ddm, .ddm__item > *, .dd__chev, .ws__menu, .ws__opt > * { transition: none !important; }
}

/* ---------- Görsel yükleme ---------- */
.img-field, .gal, .picker__box { position: relative; }
.img-field.is-drop::after, .gal.is-drop::after, .picker__box.is-drop::after {
  content: "Bırakın, yüklensin"; position: absolute; inset: -4px; z-index: 5; display: grid; place-items: center;
  border: 2px dashed var(--primary); border-radius: 12px; background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--foreground); font-weight: 600; font-size: 14px; pointer-events: none; backdrop-filter: blur(1px);
}
.img-field.is-busy .img-field__prev { pointer-events: none; }
.img-field__prev .spin, .gal__item--busy .spin, .picker__status .spin { width: 20px; height: 20px; color: var(--primary); }
.gal__item--busy { flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.picker__bar .btn--primary { flex-shrink: 0; }
.picker__status { display: none; align-items: center; gap: 8px; padding: 10px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border); }
.picker__status.is-on { display: flex; }
@media (max-width: 640px) {
  .picker__bar { flex-wrap: wrap; }
  .picker__bar .btn--primary { width: 100%; justify-content: center; }
}

/* ---------- Görsel kırpma ve döndürme ---------- */
.cropper { position: fixed; inset: 0; z-index: 98; display: grid; place-items: center; padding: 16px; }
.cropper__shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: fadeIn .15s; }
.cropper__box { position: relative; width: 100%; max-width: 760px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); animation: popIn .15s ease-out; overflow: hidden; }
.cropper.is-leaving .cropper__box { animation: none; opacity: 0; transform: scale(.97); transition: opacity .15s, transform .15s; }
.cropper.is-leaving .cropper__shade { opacity: 0; transition: opacity .15s; }
.cropper__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.cropper__head h3 { margin: 0; font-size: 16px; }
.cropper__stage {
  position: relative; flex: 1 1 auto; height: clamp(240px, 52vh, 440px); min-height: 220px; overflow: hidden; touch-action: none; cursor: grab; outline: none;
  background-color: #0a1018;
  background-image: repeating-conic-gradient(rgba(255, 255, 255, .045) 0% 25%, transparent 0% 50%);
  background-size: 22px 22px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cropper__stage:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }
.cropper__stage.is-drag { cursor: grabbing; }
.cropper__img { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: 50% 50%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.cropper__stage.is-anim .cropper__img, .cropper__stage.is-anim .cropper__frame { transition: transform .25s ease, width .25s ease, height .25s ease; }
.cropper__frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none;
  border: 2px solid rgba(255, 255, 255, .92); border-radius: 2px;
  box-shadow: 0 0 0 9999px rgba(3, 8, 14, .62);
}
/* üçte bir çizgileri */
.cropper__frame::before, .cropper__frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.cropper__frame::before { border-left: 1px solid rgba(255, 255, 255, .35); border-right: 1px solid rgba(255, 255, 255, .35); left: 33.333%; right: 33.333%; }
.cropper__frame::after { border-top: 1px solid rgba(255, 255, 255, .35); border-bottom: 1px solid rgba(255, 255, 255, .35); top: 33.333%; bottom: 33.333%; }
.cropper__bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; flex-wrap: wrap; }
.cropper__bar--zoom { padding-top: 10px; }
.cropper__lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.cropper__aspect .dd { min-width: 200px; }
.cropper__rot { display: flex; gap: 6px; }
.cropper__info { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cropper__info.is-warn { color: var(--warning); }
.cropper__range { flex: 1; min-width: 120px; height: 20px; accent-color: var(--primary); -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.cropper__range::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: var(--active); }
.cropper__range::-moz-range-track { height: 6px; border-radius: 99px; background: var(--active); }
.cropper__range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--primary); }
.cropper__range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--card); border: 2px solid var(--primary); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.cropper__range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 2px solid var(--primary); }
.cropper__range:focus-visible { outline: none; }
.cropper__range:focus-visible::-webkit-slider-thumb { box-shadow: var(--ring); }
.cropper__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 16px 16px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .cropper { padding: 0; place-items: stretch; }
  .cropper__box { max-width: none; max-height: none; height: 100dvh; border-radius: 0; border: 0; }
  .cropper__stage { height: auto; }
  .cropper__aspect { flex: 1; }
  .cropper__aspect .dd { min-width: 0; width: 100%; }
  .cropper__info { width: 100%; margin-left: 0; order: 9; }
  .cropper__foot .btn { flex: 1; justify-content: center; }
  .cropper__foot .btn--primary { flex-basis: 100%; order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .cropper__stage.is-anim .cropper__img, .cropper__stage.is-anim .cropper__frame { transition: none; }
}
