/* ------------------------------------------------------------------ Giriş ekranı görseli (authArt, app-giris.js)
   Tek kamera görüntüsü, beş sahne sırayla gelir (her biri 4,5 sn; tur 22,5 sn). İhlal sarı algılama kutusuyla işaretlenir.
   --d: sahnenin tur içindeki başlangıcı (negatif gecikme; ilk sahne sayfa açılır açılmaz görünür). */
.auth-side { align-content: center; justify-items: start; gap: 16px; }
.auth-side h1 { font-size: clamp(26px, 2.5vw, 36px); max-width: 26ch; text-wrap: balance; }
.auth-side .brand-mark { width: 96px; height: 96px; }
.auth-art { margin: 4px 0 0; width: min(100%, 720px, 74vh); aspect-ratio: 640 / 432; filter: drop-shadow(0 18px 40px rgba(2,9,22,.55)); }
.auth-art > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gs-scene { --T: 22.5s; opacity: 0; animation: gs-show var(--T) linear var(--d) infinite; }
.gs-scene.s1 { --d: 0s; } .gs-scene.s2 { --d: -18s; } .gs-scene.s3 { --d: -13.5s; } .gs-scene.s4 { --d: -9s; } .gs-scene.s5 { --d: -4.5s; }
@keyframes gs-show { 0%, 19% { opacity: 1; } 21.5%, 98% { opacity: 0; } 100% { opacity: 1; } }
.gs-edge { fill: none; stroke: rgba(201,214,238,.22); }
.gs-tick { fill: none; stroke: #c9a04a; stroke-width: 2.5; }
.gs-cam, .gs-live text { font: 600 10px/1 var(--f-mono, ui-monospace, monospace); letter-spacing: .14em; fill: #dfe7f5; }
.gs-live circle { fill: #ef5350; animation: gs-blink 1.8s steps(2, jump-none) infinite; }
@keyframes gs-blink { 50% { opacity: .25; } }

/* Algılama kutusu, iskelet, bildirim kartı */
.gs-det { --y: #ffd43b; animation: gs-lock var(--T) cubic-bezier(.2,.8,.2,1) var(--d) infinite; }
.gs-det-r { fill: rgba(255,212,59,.07); stroke: var(--y); stroke-opacity: .55; stroke-width: 1; }
.gs-det-c { fill: none; stroke: var(--y); stroke-width: 3; stroke-linecap: square; }
.gs-det-t rect { fill: var(--y); } .gs-det-t circle { fill: #d92d20; }
.gs-det-t text { font: 800 10px/1 Inter, system-ui, "Segoe UI", Arial, sans-serif; fill: #0a2142; }
@keyframes gs-lock { 0%, 2.5% { opacity: 0; transform: scale(1.3); } 4.5% { opacity: 1; transform: scale(1); } 5.5% { opacity: .4; } 6.5%, 100% { opacity: 1; transform: scale(1); } }
.gs-skel { animation: gs-fade var(--T) linear var(--d) infinite; }
.gs-skel path { fill: none; stroke: #ffd43b; stroke-opacity: .85; stroke-linecap: round; stroke-linejoin: round; }
.gs-skel circle { fill: #0a2142; stroke: #ffd43b; stroke-width: .8; }
@keyframes gs-fade { 0%, 3% { opacity: 0; } 6%, 100% { opacity: 1; } }
.gs-toast { animation: gs-toast var(--T) cubic-bezier(.2,.8,.2,1) var(--d) infinite; }
.gs-toast > rect:first-child { fill: rgba(6,18,40,.82); stroke: rgba(201,214,238,.22); }
.gs-toast-b { fill: #ffd43b; } .gs-toast-i { fill: rgba(255,212,59,.16); stroke: #ffd43b; stroke-width: 1.2; }
.gs-toast-x { fill: none; stroke: #ffd43b; stroke-width: 2; stroke-linecap: round; }
.gs-toast-1 { font: 700 11.5px/1 Inter, system-ui, "Segoe UI", Arial, sans-serif; fill: #fff; }
.gs-toast-2 { font: 500 8.5px/1 var(--f-mono, ui-monospace, monospace); letter-spacing: .1em; fill: #93a9cf; }
@keyframes gs-toast { 0%, 5% { opacity: 0; transform: translateY(10px); } 8%, 100% { opacity: 1; transform: none; } }

/* Alt şerit: sahne adları ve ilerleme çizgisi */
.gs-chip text { font: 600 10.5px/1 Inter, system-ui, "Segoe UI", Arial, sans-serif; fill: #8fa0bd; animation: gs-chip-t 22.5s linear infinite; }
.gs-chip-t { fill: rgba(201,214,238,.2); }
.gs-chip-b { fill: #d8b25e; transform: scaleX(0); animation: gs-chip-b 22.5s linear infinite; }
.gs-chip.c2 :is(text, .gs-chip-b) { animation-delay: -18s; } .gs-chip.c3 :is(text, .gs-chip-b) { animation-delay: -13.5s; }
.gs-chip.c4 :is(text, .gs-chip-b) { animation-delay: -9s; } .gs-chip.c5 :is(text, .gs-chip-b) { animation-delay: -4.5s; }
@keyframes gs-chip-t { 0%, 20% { fill: #fff; } 20.1%, 100% { fill: #8fa0bd; } }
@keyframes gs-chip-b { 0% { transform: scaleX(0); } 20% { transform: scaleX(1); } 20.1%, 100% { transform: scaleX(0); } }

/* 1) Forklift */
.gs-truck { animation: gs-drive 9s ease-in-out infinite alternate; }
.gs-wheel { animation: gs-roll 9s ease-in-out infinite alternate; }
.gs-lift { animation: gs-lift 9s ease-in-out infinite alternate; }
.gs-beacon { animation: gs-blink 1s steps(2, jump-none) infinite; }
@keyframes gs-drive { from { transform: translateX(-34px); } to { transform: translateX(30px); } }
@keyframes gs-roll { from { transform: rotate(-90deg); } to { transform: rotate(90deg); } }
@keyframes gs-lift { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* 2) Sınır: kişi soldan sağa koşar, çizgiyi geçtiği anda kutu kilitlenir. */
.gs-thief { animation: gs-flee var(--T) linear var(--d) infinite; }
.gs-bob { animation: gs-bob .38s ease-in-out infinite alternate; }
.gs-run-a { animation: gs-run-a .38s ease-in-out infinite alternate; } .gs-run-b { animation: gs-run-b .38s ease-in-out infinite alternate; }
.s2 .gs-det { animation-name: gs-catch; animation-timing-function: linear; }
.s2 .gs-skel { animation-name: gs-catch-f; }
.gs-border path { stroke: #ffd43b; stroke-width: 1.8; stroke-dasharray: 7 6; animation: gs-march 1.2s linear infinite, gs-trip var(--T) linear var(--d) infinite; }
.gs-border-l { fill: #0a2142; stroke: #ffd43b; stroke-width: 1; } .gs-border text { font: 700 9px/1 var(--f-mono, ui-monospace, monospace); letter-spacing: .14em; fill: #ffd43b; }
.gs-border-p { animation: gs-plane var(--T) linear var(--d) infinite; }
@keyframes gs-flee { 0% { transform: translateX(150px); } 20%, 100% { transform: translateX(560px); } }
@keyframes gs-catch { 0%, 9.5% { opacity: 0; transform: scale(1.3); } 10.5% { opacity: 1; transform: scale(1); } 11.3% { opacity: .4; } 12%, 100% { opacity: 1; transform: scale(1); } }
@keyframes gs-catch-f { 0%, 9.5% { opacity: 0; } 11%, 100% { opacity: 1; } }
@keyframes gs-trip { 0%, 9.5% { stroke-width: 1.8; stroke: #ffd43b; } 10.5%, 13% { stroke-width: 4; stroke: #ff6b5e; } 15%, 100% { stroke-width: 1.8; stroke: #ffd43b; } }
@keyframes gs-plane { 0%, 9.5% { opacity: .6; } 10.5%, 13% { opacity: 2.4; } 15%, 100% { opacity: .6; } }
@keyframes gs-bob { to { transform: translateY(-3px); } }
@keyframes gs-run-a { from { transform: rotate(-24deg); } to { transform: rotate(30deg); } }
@keyframes gs-run-b { from { transform: rotate(26deg); } to { transform: rotate(-26deg); } }
@keyframes gs-march { to { stroke-dashoffset: -26; } }

/* 3) Üretim hattı */
.gs-belt { animation: gs-belt 9s linear infinite; }
.gs-walk-a { animation: gs-walk-a 1.1s ease-in-out infinite alternate; } .gs-walk-b { animation: gs-walk-b 1.1s ease-in-out infinite alternate; }
@keyframes gs-belt { to { transform: translateX(-320px); } }
@keyframes gs-walk-a { from { transform: rotate(-3deg); } to { transform: rotate(5deg); } }
@keyframes gs-walk-b { from { transform: rotate(4deg); } to { transform: rotate(-4deg); } }

/* 4) Elektrik panosu */
.gs-work { animation: gs-work 1.8s ease-in-out infinite alternate; }
.gs-spark { transform-origin: 378px 127px; animation: gs-spark 2.2s linear infinite; }
@keyframes gs-work { to { transform: rotate(4deg); } }
@keyframes gs-spark { 0%, 36%, 46%, 56%, 100% { opacity: 0; transform: scale(.6); } 41%, 51% { opacity: 1; transform: scale(1.1); } }

/* 5) Yasak bölge */
.gs-zone-f { fill: rgba(255,212,59,.1); animation: gs-zone 1.8s ease-in-out infinite alternate; }
.gs-zone-h { fill: none; stroke: url(#gs-haz); stroke-width: 9; }
.gs-zone-l { fill: none; stroke: #ffd43b; stroke-width: 1.2; stroke-opacity: .7; }
.gs-arm1 { animation: gs-arm1 5s ease-in-out infinite alternate; } .gs-arm2 { animation: gs-arm2 2.5s ease-in-out infinite alternate; }
.gs-step { animation: gs-step 2.4s ease-in-out infinite alternate; }
@keyframes gs-zone { from { fill: rgba(255,212,59,.06); } to { fill: rgba(255,107,94,.22); } }
@keyframes gs-arm1 { from { transform: rotate(-5deg); } to { transform: rotate(8deg); } }
@keyframes gs-arm2 { from { transform: rotate(-9deg); } to { transform: rotate(14deg); } }
@keyframes gs-step { from { transform: rotate(4deg); } to { transform: rotate(-4deg); } }

@media (max-width: 800px) { .auth-art { width: min(100%, 460px, 50vh); justify-self: center; } .auth-side .brand-mark { width: 72px; height: 72px; } }
@media (max-height: 620px) and (max-width: 800px) { .auth-art { display: none; } }
@media (max-height: 780px) and (min-width: 801px) { .auth-side { padding-block: 20px; gap: 10px; } .auth-side > p { display: none; } .auth-side .brand-mark { width: 72px; height: 72px; } .auth-side h1 { font-size: 24px; max-width: none; } .auth-art { width: min(100%, 720px, 70vh); } }
/* "Animasyonları azalt" açıkken (Windows'ta sık görülür) sahneler yine sırayla gelir ve hareket eder;
   yalnızca yanıp sönen parçalar (kıvılcım, tepe lambası, kayıt noktası) durur. app.css içindeki genel kural bu görseli kapsamaz. */
@media (prefers-reduced-motion: reduce) {
  .gs-spark, .gs-beacon, .gs-live circle { animation: none; }
  .gs-spark { opacity: 0; }
}
