/* Demir Konut v12.8.0 — Uygulama hissi katmanı (v127 Tasarım 3.0 üstüne; v127-pages.css'ten SONRA, v128-platform.css'ten ÖNCE yüklenir)
   1) yerel uygulama hissi: metin seçimi ve kopyalama kapalı (alanlar, kod ve sohbet yanıtları hariç), uzun basma balonu yok,
      sürükleme yok, çift dokunma / pinch yakınlaştırma yok (harita ve 3D kendi hareketlerini JS ile yönetir)
   2) yumuşak kaydırma ve sayfa geçişleri (yaylı eğri, kaydırma yakalama, dokunma geri bildirimi)
   3) VIP açılış ekranı (ışıltı, ızgara dokusu, halka, yazı açılışı, parlayan çubuk, yumuşak kapanış)
   4) alttan açılan bildirimler (toast): cam yüzey, tür rengi, simge rozeti, kalan süre çizgisi
   5) alt pencereler: telefon/tablette yaylı alt sayfa; masaüstünde (kenar menü düzeni) kayıt düzenleme ve detay SAĞDAN açılan panel */

/* ================================================================ 1) yerel uygulama hissi */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body, #app, #login, #sheets, .toasts, .atlas-dock, .atlas-launcher, .tour, .ctx-menu, .sel-bar, .lock-screen, .splash {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
/* v12.5.1'in seçilebilir yaptığı liste/gösterge/tablo metinleri yeniden kapalı; kopyalama sağ tık / uzun basma menüsündeki "Kopyala" ile */
.li .li-title, .li .li-sub, .li-amt, .kpi-val, .kpi-label, .stat-row, table td, table th, .detail-grid, .detail-grid b, .hero, .card-head, .section-title {
  -webkit-user-select: none; user-select: none;
}
/* seçilebilir kalanlar: yazı alanları, kod, sohbet yanıtları ve .can-select */
input, textarea, select, [contenteditable="true"], [contenteditable=""], pre, code, .mono, .can-select, .can-select *, .atlas-message, .atlas-message *, .bubble.bot, .bubble.bot * {
  -webkit-user-select: text; user-select: text; -webkit-touch-callout: default;
}
img, svg, a, .tile, .li, .kpi, .card, .quick-grid .quick, .w-tool-btn { -webkit-user-drag: none; user-drag: none; }
.main > #view, #topbar, #tabbar, .sidebar, .sheet, .atlas-dock { touch-action: pan-x pan-y; }
.leaflet-container, .bim-stage, .bim-stage canvas, .sig-wrap canvas, .pg-view canvas, .qr-wrap, .dash-handle, .drag-grip, .sheet-head { touch-action: none; }
.sheet .sheet-body { touch-action: pan-y; }
.m-view img, .m-view video { touch-action: pinch-zoom; }
:focus:not(:focus-visible) { outline: none; }
::-webkit-scrollbar-button { display: none; }

/* ================================================================ 2) yumuşak kaydırma ve geçişler */
html { scroll-behavior: smooth; }
body { overscroll-behavior-y: none; }
.main > #view, .sheet-body, .mp-drawer, .table-wrap, [data-ux-table], .atlas-messages, .aix-chat { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.main > #view { scroll-padding-top: calc(var(--sticky-top) + 12px); }
.filters, .chips:not(.wrap), .sum-strip, .nc-filters, .chips.quick, .chips.tpl { scroll-snap-type: x proximity; scroll-padding-inline: 8px; }
.filters > *, .chips:not(.wrap) > *, .sum-strip > *, .nc-filters > *, .chips.quick > *, .chips.tpl > * { scroll-snap-align: start; }
.page { animation: pageIn .38s cubic-bezier(.32, .72, 0, 1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px) scale(.995); } to { opacity: 1; transform: none; } }
::view-transition-old(page), ::view-transition-new(page) { animation-duration: .3s; animation-timing-function: cubic-bezier(.32, .72, 0, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .26s; }
html[data-nav="forward"]::view-transition-new(page) { animation: vt-in-r .34s cubic-bezier(.32, .72, 0, 1) both; }
html[data-nav="back"]::view-transition-new(page) { animation: vt-in-l .34s cubic-bezier(.32, .72, 0, 1) both; }
.reveal > * { animation-duration: .5s; animation-timing-function: cubic-bezier(.32, .72, 0, 1); }
.btn, .chip, .tile, .li, .kpi, .card, .icon-btn, .tab, .sb-link, .quick-grid .quick, .w-tool-btn { transition-timing-function: cubic-bezier(.32, .72, 0, 1); }
.li:active, .tile:active, .quick-grid .quick:active, .w-tool-btn:active, .nc-item:active, .dash-tool-links a:active, .sb-link:active { transform: scale(.985); transition-duration: .08s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page, .reveal > * { animation: none; }
  .li:active, .tile:active, .quick-grid .quick:active, .w-tool-btn:active { transform: none; }
}

/* ================================================================ 3) VIP açılış ekranı */
.splash { gap: 12px; overflow: hidden; isolation: isolate; transition: opacity .4s var(--ease), transform .4s var(--ease); }
.splash::before {
  content: ''; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 36% at 78% 18%, color-mix(in srgb, var(--sp-acc, #C8963E) 34%, transparent), transparent 70%),
    radial-gradient(36% 30% at 16% 86%, color-mix(in srgb, var(--sp-acc, #C8963E) 14%, transparent), transparent 70%);
  animation: spGlow 9s ease-in-out infinite alternate;
}
.splash::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .07;
  background-image:
    linear-gradient(color-mix(in srgb, var(--sp-fg, #fff) 60%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--sp-fg, #fff) 60%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 45%, #000, transparent 100%); mask-image: radial-gradient(60% 60% at 50% 45%, #000, transparent 100%);
}
@keyframes spGlow { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-3%, 2%, 0) scale(1.06); } }
.splash-mark {
  position: relative; width: 88px; height: 88px; border-radius: 26px; font-size: 32px; letter-spacing: -.8px; color: #fff;
  background: linear-gradient(145deg, var(--sp-acc, #C8963E) 0%, color-mix(in srgb, var(--sp-acc, #C8963E) 72%, #000) 100%);
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .18);
  animation: spMark .9s var(--ease-out) both;
}
.splash-mark::after { content: ''; position: absolute; inset: -6px; border-radius: 32px; border: 2px solid color-mix(in srgb, var(--sp-acc, #C8963E) 70%, transparent); opacity: 0; animation: spRing 1.8s .5s ease-out infinite; }
@keyframes spMark { from { transform: scale(.7) translateY(14px); opacity: 0; } 60% { transform: scale(1.04) translateY(0); opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes spRing { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.splash-logo { animation: spMark .9s var(--ease-out) both; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.splash-name { font-size: 21px; font-weight: 750; letter-spacing: .02em; margin-top: 6px; animation: spName .9s .18s var(--ease-out) both; }
@keyframes spName { from { opacity: 0; letter-spacing: .28em; transform: translateY(8px); } to { opacity: 1; letter-spacing: .02em; transform: none; } }
.splash-sub { margin-top: -4px; opacity: .72; animation: spIn .6s .42s var(--ease-out) both; }
.splash-bar { width: 168px; height: 3px; margin-top: 16px; background: color-mix(in srgb, var(--sp-fg, #fff) 14%, transparent); animation: spIn .6s .5s var(--ease-out) both; }
.splash-bar span { width: 46%; background: linear-gradient(90deg, transparent, var(--sp-acc, var(--accent-2)), transparent); box-shadow: 0 0 12px color-mix(in srgb, var(--sp-acc, #C8963E) 60%, transparent); animation: slide 1.25s infinite cubic-bezier(.4, 0, .2, 1); }
.splash-status { animation: spIn .5s both; }
.splash.hide { opacity: 0; transform: scale(1.035); }
html[data-splash-anim="0"] .splash::before, html[data-splash-anim="0"] .splash::after, html[data-splash-anim="0"] .splash-mark::after,
html.reduce-motion .splash::before, html.reduce-motion .splash::after, html.reduce-motion .splash-mark::after,
.splash.no-anim::before, .splash.no-anim::after, .splash.no-anim .splash-mark::after { animation: none !important; }
html[data-splash-anim="0"] .splash.hide, html.reduce-motion .splash.hide { transform: none; }
@media (prefers-reduced-motion: reduce) { .splash::before, .splash::after, .splash-mark::after { animation: none !important; } .splash.hide { transform: none; } }
@media (max-height: 430px) { .splash-mark { width: 60px; height: 60px; border-radius: 18px; font-size: 22px; } .splash-mark::after { border-radius: 24px; } .splash-name { font-size: 17px; } }

/* ================================================================ 4) alttan açılan bildirimler (toast) */
.toasts { gap: 10px; }
.toast {
  --tc: #7FB0F5; position: relative; overflow: hidden; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); border-left: 0;
  background: color-mix(in srgb, #0F1826 90%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .2); color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.4;
  transform: translateY(18px) scale(.97); transition: transform .42s cubic-bezier(.32, .72, 0, 1), opacity .3s var(--ease);
}
[data-theme="dark"] .toast { background: color-mix(in srgb, #1A2535 92%, transparent); border-color: rgba(255, 255, 255, .12); }
.toast.show { transform: none; }
.toast.success { --tc: #34D399; } .toast.error { --tc: #F87171; } .toast.warn { --tc: #FBBF24; } .toast.info { --tc: #7FB0F5; }
.toast.success, .toast.error, .toast.warn { border-left: 0; }
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tc); }
.toast > svg:first-child, .toast > .ic:first-child { flex: none; width: 34px; height: 34px; padding: 8px; box-sizing: border-box; border-radius: 11px; color: var(--tc) !important; background: color-mix(in srgb, var(--tc) 20%, transparent); }
.toast .toast-act { background: color-mix(in srgb, var(--tc) 22%, transparent); color: #fff; border: 1px solid color-mix(in srgb, var(--tc) 40%, transparent); border-radius: 10px; min-height: 36px; padding: 6px 12px; font-size: 12.5px; }
.toast .toast-act:hover { background: color-mix(in srgb, var(--tc) 34%, transparent); }
.toast .toast-x { opacity: .6; }
.toast .toast-n { background: color-mix(in srgb, var(--tc) 28%, transparent); }
/* kalan süre çizgisi: çekirdekteki varsayılan sürelerle aynı (bilgi 4 sn, uyarı/hata 6 sn, eylemli 8 sn); üzerine gelince durur */
.toast::after { content: ''; position: absolute; left: 4px; right: 0; bottom: 0; height: 2px; background: var(--tc); opacity: .55; transform-origin: left; transform: scaleX(0); }
.toast.show::after { animation: toastLife var(--toast-ms, 4000ms) linear forwards; }
.toast.error.show::after, .toast.warn.show::after { --toast-ms: 6000ms; }
.toast.is-action.show::after { --toast-ms: 8000ms; }
.toast:hover::after, .toast:focus-within::after { animation-play-state: paused; }
@keyframes toastLife { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 640px) { .toasts { width: calc(100vw - 20px); } .toast { border-radius: 14px; padding: 11px 10px 11px 12px; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity .2s; transform: none; } .toast.show::after { animation: none; } }

/* ================================================================ 5) alt pencereler: yaylı alt sayfa ve sağ panel */
.sheet-backdrop { background: color-mix(in srgb, #0B1119 58%, transparent); -webkit-backdrop-filter: blur(6px) saturate(1.2); backdrop-filter: blur(6px) saturate(1.2); }
.sheet { border-radius: 28px 28px 0 0; box-shadow: 0 -24px 64px -24px rgba(0, 0, 0, .5); transition: transform .5s cubic-bezier(.32, .72, 0, 1); }
.sheet-handle { width: 40px; height: 4px; margin: 8px auto 0; background: var(--line-strong); opacity: 1; }
.sheet-head { padding: 12px 10px 12px 20px; border-bottom-color: var(--line-2); }
.sheet-head h3 { font-size: 17.5px; letter-spacing: -.2px; }
.sheet-head .icon-btn { border-radius: 12px; background: var(--surface-2); }
.sheet-foot { background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top-color: var(--line-2); }
.sheet-body { scroll-behavior: smooth; }
.tx-sheet { border-radius: 28px 28px 0 0; }
.tx-section, .scan-bar, .tx-quick { border-radius: 16px; }
@media (max-width: 767px) { .tx-sheet { border-radius: 28px 28px 0 0; } }
@media (min-width: 768px) { .sheet { transition: transform .38s cubic-bezier(.32, .72, 0, 1), opacity .25s; border-radius: var(--radius-xl); } }

/* masaüstü (kenar menü düzeni ≥ 1024 px): kayıt düzenleme (full) ve detay (tall) pencereleri sağdan panel olarak açılır */
@media (min-width: 1024px) {
  :root { --drawer-w: 720px; }
  .sheet-wrap:has(> .sheet.full), .sheet-wrap:has(> .sheet.tall) { justify-content: flex-end; align-items: stretch; padding: 0; }
  .sheet.full, .sheet.tall {
    width: min(var(--drawer-w), calc(100vw - var(--sidebar-w) - 24px)) !important; max-width: none !important;
    height: 100dvh !important; max-height: 100dvh !important; margin: 0; border-radius: 0 !important; border: 0; border-left: 1px solid var(--line);
    box-shadow: -32px 0 80px -24px rgba(0, 0, 0, .45); padding-bottom: 0;
    opacity: 0; transform: translateX(56px); transition: transform .46s cubic-bezier(.32, .72, 0, 1), opacity .3s var(--ease);
  }
  .sheet-wrap.open .sheet.full, .sheet-wrap.open .sheet.tall { transform: none; opacity: 1; }
  .sheet.full .sheet-handle, .sheet.tall .sheet-handle { display: none; }
  .sheet.full .sheet-head, .sheet.tall .sheet-head { padding: 18px 16px 14px 24px; }
  .sheet.full .sheet-head h3, .sheet.tall .sheet-head h3 { font-size: 19px; }
  .sheet.full .sheet-body, .sheet.tall .sheet-body { padding: 20px 24px 28px; }
  .sheet.full .sheet-foot, .sheet.tall .sheet-foot { padding: 14px 24px max(14px, var(--safe-b)); }
  .tx-sheet { width: min(var(--drawer-w), calc(100vw - var(--sidebar-w) - 24px)) !important; }
  .tx-sheet .sheet-body { padding: 18px 22px 26px; }
  #txf { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tx-basic, .tx-payment, .tx-extra { grid-column: 1; }
}
@media (min-width: 1440px) {
  :root { --drawer-w: 840px; }
  #txf { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .tx-basic { grid-column: 1; } .tx-payment { grid-column: 2; } .tx-extra { grid-column: 1 / -1; }
}
@media (min-width: 1800px) { :root { --drawer-w: 920px; } }
@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet.full, .sheet.tall { transition: opacity .2s; transform: none; }
}
@media (forced-colors: active) { .toast::before, .sheet-handle { background: Highlight; } .toast { border: 1px solid CanvasText; } }
