/* Hareket katmanı. Bütün kurallar body[data-duzey] altında; düzeyi base.html yazar (sakin | canli | gosterisli).
   Yalnızca transform / opacity / gölge: düzen kaymaz, okutma beklemez. */

/* Ortak kareler */
@keyframes h-sol { from { opacity: 0; } }
@keyframes h-gel { from { opacity: 0; transform: translateY(8px); } }
@keyframes h-gel-buyuk { from { opacity: 0; transform: translateX(-28px) scale(.97); } }
@keyframes h-sari { from { box-shadow: inset 0 0 0 999px rgba(242, 182, 0, .32); } to { box-shadow: inset 0 0 0 999px rgba(242, 182, 0, 0); } }
@keyframes h-yeni-kay { from { opacity: 0; transform: translateY(-14px); } }
@keyframes h-onay { from { box-shadow: 0 0 0 8px var(--ok); } to { box-shadow: 0 0 0 0 transparent; } }
@keyframes h-pat { 40% { transform: scale(1.06); } }
@keyframes h-pat-buyuk { 35% { transform: scale(1.22); } 70% { transform: scale(.96); } }
@keyframes h-sars { 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes h-parla { from { filter: brightness(1.5); } }
@keyframes h-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes h-in-buyuk { from { opacity: 0; transform: scale(.9); } 60% { transform: scale(1.03); } }
@keyframes h-sayfa { from { opacity: 0; transform: translateY(22px); } }
@keyframes h-konfeti { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

/* Etkileşim parçaları (Canlı ve Gösterişli) */
.h-ucan { position: fixed; z-index: 98; margin: 0; padding: 8px 12px; background: var(--ok); color: #fff; font-weight: 700; border-radius: 4px;
  pointer-events: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.h-dalga, .h-cizgi, .h-ilerleme { display: none; }
[data-duzey=canli] .h-dalgali, [data-duzey=gosterisli] .h-dalgali { position: relative; overflow: hidden; }
[data-duzey=canli] .h-dalga, [data-duzey=gosterisli] .h-dalga { display: block; position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: currentColor; opacity: .28; pointer-events: none; animation: h-dalga .6s ease-out forwards; }
@keyframes h-dalga { to { transform: scale(26); opacity: 0; } }
[data-duzey=canli] .tabs, [data-duzey=gosterisli] .tabs { position: relative; }
[data-duzey=canli] .h-cizgi, [data-duzey=gosterisli] .h-cizgi { display: block; position: absolute; bottom: 0; height: 5px; background: var(--action);
  pointer-events: none; transition: left .25s cubic-bezier(.3, .9, .3, 1), width .25s cubic-bezier(.3, .9, .3, 1); }
[data-duzey=gosterisli] .h-cizgi { transition-duration: .5s; transition-timing-function: cubic-bezier(.3, 1.6, .4, 1); }
[data-duzey=canli] .ticket, [data-duzey=gosterisli] .ticket { position: relative; }
[data-duzey=canli] .h-ilerleme, [data-duzey=gosterisli] .h-ilerleme { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: var(--ok); transform: scaleX(var(--oran, 0)); transform-origin: 0 50%; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); }
[data-duzey=canli] .h-kap { animation: h-pat-buyuk .35s; }
[data-duzey=gosterisli] .h-kap { animation: h-pat-buyuk .5s cubic-bezier(.3, 1.8, .5, 1), h-onay .7s ease-out; }
[data-duzey=canli] .order-row, [data-duzey=canli] .returns-row, [data-duzey=canli] .day-row { transition: box-shadow .15s, background-color .15s; }
[data-duzey=canli] .order-row:hover, [data-duzey=canli] .returns-row:hover { box-shadow: inset 6px 0 0 var(--action); }
[data-duzey=gosterisli] .order-row, [data-duzey=gosterisli] .returns-row { transition: box-shadow .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1), background-color .2s; }
[data-duzey=gosterisli] .order-row:hover, [data-duzey=gosterisli] .returns-row:hover { box-shadow: inset 8px 0 0 var(--action); transform: translateX(6px); }
[data-duzey=gosterisli] .h-isik:hover { background-image: radial-gradient(circle 170px at var(--mx) var(--my), rgba(110, 140, 255, .2), transparent); }
[data-duzey=gosterisli] .h-isik:hover { background-image: radial-gradient(circle 170px at var(--mx) var(--my), color-mix(in srgb, var(--action) 22%, transparent), transparent); }
[data-duzey=gosterisli] .shelf:not(.shelf-empty), [data-duzey=gosterisli] .pick-loc { transition: transform .22s cubic-bezier(.3, 1.6, .5, 1), box-shadow .22s; }
[data-duzey=gosterisli] .shelf:not(.shelf-empty):hover, [data-duzey=gosterisli] .pick-loc:hover { transform: translateY(-4px); box-shadow: 0 8px 0 var(--ink); }

/* ── Sakin: kısa, yalnızca neyin değiştiğini gösterir ── */
[data-duzey=sakin] .h-ilk { animation: h-sol .12s; }
[data-duzey=sakin] .h-yeni { animation: h-sari 1.4s; }
[data-duzey=sakin] .h-degisti { animation: h-onay .4s ease-out; }
[data-duzey=sakin] .band.h-vur { animation: h-parla .14s; }
[data-duzey=sakin] .h-say { animation: h-sari .6s; }
[data-duzey=sakin] dialog[open], [data-duzey=sakin] .sort-ask:not([hidden]), [data-duzey=sakin] .outcome:not([hidden]) { animation: h-sol .12s; }

/* ── Canlı ── */
[data-duzey=canli] main { animation: h-sol .18s; }
[data-duzey=canli] .h-ilk { animation: h-gel .26s cubic-bezier(.2, .8, .3, 1) backwards; animation-delay: calc(var(--i, 0) * 28ms); }
[data-duzey=canli] .h-yeni { animation: h-yeni-kay .32s cubic-bezier(.2, .8, .3, 1), h-sari 1.8s; }
[data-duzey=canli] .h-degisti { animation: h-onay .5s ease-out, h-pat .3s; }
[data-duzey=canli] .band.h-vur { animation: h-in .2s cubic-bezier(.2, .8, .3, 1), h-parla .3s; }
[data-duzey=canli] .band-bad.h-vur { animation: h-sars .38s, h-parla .3s; }
[data-duzey=canli] .h-say { animation: h-pat-buyuk .35s; }
[data-duzey=canli] dialog[open], [data-duzey=canli] .sort-ask:not([hidden]) { animation: h-in .22s cubic-bezier(.2, .8, .3, 1); }
[data-duzey=canli] .outcome:not([hidden]) { animation: h-in .25s cubic-bezier(.2, .8, .3, 1); }
[data-duzey=canli] .tabs button, [data-duzey=canli] .order-row, [data-duzey=canli] .returns-row { transition: background-color .15s, color .15s; }
[data-duzey=canli] main .btn { transition: transform .08s; }
[data-duzey=canli] main .btn:active { transform: scale(.97); }

/* ── Gösterişli ── */
[data-duzey=gosterisli] main { animation: h-sayfa .42s cubic-bezier(.2, .9, .3, 1); }
[data-duzey=gosterisli] .h-ilk { animation: h-gel-buyuk .5s cubic-bezier(.2, 1.5, .4, 1) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
[data-duzey=gosterisli] .h-yeni { animation: h-gel-buyuk .55s cubic-bezier(.2, 1.5, .4, 1), h-sari 2.4s; }
[data-duzey=gosterisli] .h-degisti { animation: h-onay .7s ease-out, h-pat-buyuk .5s cubic-bezier(.3, 1.6, .5, 1); }
[data-duzey=gosterisli] .band.h-vur { animation: h-in-buyuk .38s cubic-bezier(.2, 1.5, .4, 1), h-parla .45s; }
[data-duzey=gosterisli] .band-bad.h-vur { animation: h-sars .5s, h-parla .45s; }
[data-duzey=gosterisli] .h-say { animation: h-pat-buyuk .5s cubic-bezier(.3, 1.8, .5, 1), h-sari 1.2s; }
[data-duzey=gosterisli] dialog[open], [data-duzey=gosterisli] .sort-ask:not([hidden]) { animation: h-in-buyuk .4s cubic-bezier(.2, 1.5, .4, 1); }
[data-duzey=gosterisli] .outcome:not([hidden]) { animation: h-in-buyuk .5s cubic-bezier(.2, 1.5, .4, 1); }
[data-duzey=gosterisli] dialog::backdrop { animation: h-sol .3s; }
[data-duzey=gosterisli] .tabs button, [data-duzey=gosterisli] .order-row, [data-duzey=gosterisli] .returns-row { transition: background-color .25s, color .25s; }
[data-duzey=gosterisli] main .btn { transition: transform .18s cubic-bezier(.3, 1.8, .5, 1), box-shadow .18s; }
[data-duzey=gosterisli] main .btn:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
[data-duzey=gosterisli] main .btn:active:not(:disabled) { transform: scale(.94); box-shadow: none; }
[data-duzey=gosterisli] .shelf { transition: background-color .3s, border-color .3s; }
.h-konfeti { position: fixed; z-index: 99; width: 10px; height: 16px; pointer-events: none; animation: h-konfeti 1.2s cubic-bezier(.2, .7, .4, 1) forwards; }
.h-r1 { background: var(--warn); } .h-r2 { background: var(--action); } .h-r3 { background: var(--ok); } .h-r4 { background: var(--bad); }

@media (prefers-reduced-motion: reduce) {
  [data-duzey] *, [data-duzey] *::before, [data-duzey] *::after { animation: none !important; transition: none !important; }
  .h-konfeti { display: none; }
}
@media print {
  .h-konfeti, .h-ucan, .h-dalga, .h-cizgi, .h-ilerleme { display: none !important; }
  [data-duzey] * { animation: none !important; transition: none !important; }
}

/* ───────── Cam teması: limon ışıklı, camlı hareketler ───────── */
@keyframes c-nefes { from { transform: translate3d(-4vw, 3vh, 0) scale(.94); opacity: .78; } to { transform: translate3d(4vw, -3vh, 0) scale(1.08); opacity: 1; } }
@keyframes c-gir { from { opacity: 0; transform: translateY(26px) scale(.985); filter: blur(10px); } }
@keyframes c-limon { from { box-shadow: inset 0 0 0 999px rgba(198, 244, 50, .26); } to { box-shadow: inset 0 0 0 999px rgba(198, 244, 50, 0); } }
@keyframes c-nabiz { 0%, 100% { box-shadow: 0 8px 26px rgba(198, 244, 50, .3), 0 0 0 0 rgba(198, 244, 50, .42); } 60% { box-shadow: 0 8px 34px rgba(198, 244, 50, .46), 0 0 0 14px rgba(198, 244, 50, 0); } }
@keyframes c-supur { from { background-position: 130% 0; } to { background-position: -30% 0; } }
@keyframes c-panel { from { opacity: 0; transform: translateY(34px) scale(.96); filter: blur(14px); } }
@keyframes c-menu { from { opacity: 0; transform: translateX(-14px); } }

/* Zemindeki ışık yavaşça nefes alır */
[data-renk=cam][data-duzey=canli]::before, [data-renk=cam][data-duzey=gosterisli]::before { animation: c-nefes 11s ease-in-out infinite alternate; will-change: transform, opacity; }
[data-renk=cam].login-page::before { animation: c-nefes 9s ease-in-out infinite alternate; }
[data-renk=cam].login-page .login { animation: c-panel .9s cubic-bezier(.22, 1, .36, 1) both; }
[data-renk=cam].login-page .login > *, [data-renk=cam].login-page .login form > * { animation: h-gel .6s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: .32s; }
[data-renk=cam].login-page .login form > :nth-child(n+3) { animation-delay: .42s; }
[data-renk=cam].login-page .login form > :nth-child(n+5) { animation-delay: .52s; }

/* Sayfa açılışı: bölümler sırayla, bulanıktan netleşerek yükselir (sınıfı hareket.js bir kez verir) */
[data-renk=cam][data-duzey=gosterisli] main { animation: none; }
[data-renk=cam][data-duzey=gosterisli] .c-gir { animation: c-gir .72s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: calc(var(--s, 0) * 80ms); }
[data-renk=cam][data-duzey=canli] .c-gir { animation: h-gel .4s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: calc(var(--s, 0) * 45ms); }
[data-renk=cam][data-duzey=gosterisli] .topnav a { animation: c-menu .5s cubic-bezier(.22, 1, .36, 1) backwards; }
[data-renk=cam][data-duzey=gosterisli] .topnav a:nth-child(2) { animation-delay: 50ms; } [data-renk=cam][data-duzey=gosterisli] .topnav a:nth-child(3) { animation-delay: 100ms; }
[data-renk=cam][data-duzey=gosterisli] .topnav a:nth-child(4) { animation-delay: 150ms; } [data-renk=cam][data-duzey=gosterisli] .topnav a:nth-child(5) { animation-delay: 200ms; }

/* Yeni / değişen satır sarı yerine limon yanar */
[data-renk=cam][data-duzey=sakin] .h-yeni { animation: c-limon 1.4s; }
[data-renk=cam][data-duzey=canli] .h-yeni { animation: h-yeni-kay .32s cubic-bezier(.2, .8, .3, 1), c-limon 1.8s; }
[data-renk=cam][data-duzey=gosterisli] .h-yeni { animation: h-gel-buyuk .55s cubic-bezier(.2, 1.5, .4, 1), c-limon 2.4s; }
[data-renk=cam][data-duzey=gosterisli] .h-say { animation: h-pat-buyuk .5s cubic-bezier(.3, 1.8, .5, 1), c-limon 1.2s; }
[data-renk=cam] .h-ucan { background: var(--action); color: var(--action-ink); border-radius: 999px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .3) inset, 0 10px 34px rgba(198, 244, 50, .55); }
[data-renk=cam] .h-cizgi { height: 3px; border-radius: 3px; box-shadow: 0 0 16px 2px rgba(198, 244, 50, .7); }
[data-renk=cam] .h-ilerleme { height: 4px; background: var(--action); box-shadow: 0 0 18px 2px rgba(198, 244, 50, .65); border-radius: 0 4px 4px 0; }
[data-renk=cam] .h-r1 { background: #c6f432; } [data-renk=cam] .h-r2 { background: #fff; } [data-renk=cam] .h-r3 { background: #e6ff8f; } [data-renk=cam] .h-r4 { background: #2dd4a7; }
[data-renk=cam] .h-konfeti { border-radius: 2px; box-shadow: 0 0 12px rgba(198, 244, 50, .5); }

/* Düğmeler: sert gölge yerine yükselme ve ışık */
[data-renk=cam][data-duzey=gosterisli] main .btn { transition: transform .32s cubic-bezier(.3, 1.7, .5, 1), box-shadow .25s, background-color .2s, border-color .2s; }
[data-renk=cam][data-duzey=gosterisli] main .btn:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .2); }
[data-renk=cam][data-duzey=gosterisli] main .btn-primary:hover:not(:disabled) { box-shadow: 0 14px 40px rgba(198, 244, 50, .5), 0 0 0 1px rgba(255, 255, 255, .35) inset;
  background-image: linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, 0) 62%); background-size: 260% 100%; background-position: -30% 0; background-repeat: no-repeat; animation: c-supur .85s ease-out; }
[data-renk=cam][data-duzey=gosterisli] main .btn:active:not(:disabled) { transform: scale(.95); }
[data-renk=cam][data-duzey=gosterisli] main .btn-primary.btn-xl:not(:disabled):not(:hover) { animation: c-nabiz 2.6s ease-out infinite; }

/* Satırlar ve kartlar */
[data-renk=cam][data-duzey=canli] .order-row:hover, [data-renk=cam][data-duzey=canli] .returns-row:hover { box-shadow: inset 3px 0 0 var(--action); }
[data-renk=cam][data-duzey=gosterisli] .order-row:hover, [data-renk=cam][data-duzey=gosterisli] .returns-row:hover { box-shadow: inset 3px 0 0 var(--action), inset 60px 0 60px -40px rgba(198, 244, 50, .22); transform: translateX(5px); }
[data-renk=cam][data-duzey=gosterisli] .h-isik:hover { background-image: radial-gradient(circle 220px at var(--mx) var(--my), rgba(198, 244, 50, .2), transparent 70%); }
/* Kart imlece doğru hafifçe eğilir (--rx / --ry değerlerini hareket.js yazar; yalnızca fare) */
[data-renk=cam][data-duzey=gosterisli] .shelf:not(.shelf-empty), [data-renk=cam][data-duzey=gosterisli] .pick-loc, [data-renk=cam][data-duzey=gosterisli] .ticket {
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .3s, border-color .3s, background-color .3s; }
[data-renk=cam][data-duzey=gosterisli] .shelf:not(.shelf-empty):hover, [data-renk=cam][data-duzey=gosterisli] .pick-loc:hover {
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); border-color: rgba(198, 244, 50, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 22px 46px rgba(0, 0, 0, .55), 0 0 34px -6px rgba(198, 244, 50, .4); }
[data-renk=cam][data-duzey=gosterisli] .ticket.h-isik:hover { transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
[data-renk=cam][data-duzey=gosterisli] dialog[open] { animation: c-panel .5s cubic-bezier(.22, 1, .36, 1); }

@media (prefers-reduced-motion: reduce) {
  [data-renk=cam]::before, [data-renk=cam].login-page .login, [data-renk=cam].login-page .login * { animation: none !important; }
}
