/* ──────────────────────────────────────────────────────────────
   Landing page animasyonları ve inline editör arayüzü.
   Tailwind ile üretilmeyen, elle yazılmış stiller burada durur.
   ────────────────────────────────────────────────────────────── */

/* ── Hero: dönen neon çerçeve ── */
@property --neon-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes neonRotate {
    0%   { --neon-angle: 0deg; }
    100% { --neon-angle: 360deg; }
}

.neon-border-wrapper {
    position: relative;
    padding: 3px;
    border-radius: 1.5rem;
    background: conic-gradient(from var(--neon-angle), #0C7FF2 0%, #22D3EE 25%, #4F46E5 50%, #C084FC 75%, #0C7FF2 100%);
    animation: neonRotate 5s linear infinite;
    box-shadow: 0 10px 35px -8px rgba(12, 127, 242, 0.28), 0 0 20px -3px rgba(34, 211, 238, 0.2);
}

@media (min-width: 640px) {
    .neon-border-wrapper {
        padding: 4px;
        border-radius: 2rem;
    }
}

/* @property desteklemeyen tarayıcılarda sabit bir degrade kalsın. */
@supports not (background: conic-gradient(from var(--neon-angle), red, blue)) {
    .neon-border-wrapper {
        background: linear-gradient(120deg, #0C7FF2, #22D3EE, #C084FC);
        animation: none;
    }
}

/* ══════════════════════════════════════════════════════════════
   SANAT YÖNETİMİ — atmosfer, ritim, hareket
   ══════════════════════════════════════════════════════════════ */

/* ── Aurora: bölüm arkasında duran, bulanık renk kütleleri ──
   Blur animasyonu yok; sadece yavaşça sürükleniyorlar, bu yüzden
   compositor üzerinde kalıyor ve boyama maliyeti doğurmuyor. */
.aurora {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.aurora span {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.5;
    will-change: transform;
}

.aurora span:nth-child(1) {
    width: 420px; height: 420px;
    top: -140px; left: 8%;
    background: rgba(12, 127, 242, 0.45);
    animation: auroraDriftA 18s ease-in-out infinite alternate;
}

.aurora span:nth-child(2) {
    width: 460px; height: 460px;
    top: -60px; right: 4%;
    background: rgba(168, 85, 247, 0.38);
    animation: auroraDriftB 22s ease-in-out infinite alternate;
}

.aurora span:nth-child(3) {
    width: 340px; height: 340px;
    top: 200px; left: 40%;
    background: rgba(34, 211, 238, 0.34);
    animation: auroraDriftA 26s ease-in-out infinite alternate-reverse;
}

@keyframes auroraDriftA {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(40px, 30px, 0) scale(1.12); }
}

@keyframes auroraDriftB {
    from { transform: translate3d(0, 0, 0) scale(1.08); }
    to   { transform: translate3d(-50px, 20px, 0) scale(1); }
}

/* ── Nokta ızgara dokusu ── */
.dot-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

.dot-grid-light::before {
    background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}

/* ── Koyu bölüm: sayfanın ritmini kıran kontrast anı ──
   Lacivert-turkuazdan gece indigosu → menekşe → azur'a taşındı; aynı
   kontrastı veriyor ama çok daha canlı. */
/* ::before nokta ızgarasının, ::after grenin — bu yüzden köşe ışıkları
   ayrı katman değil, arka planın kendi katmanları olarak veriliyor. */
.section-deep {
    position: relative;
    background:
        radial-gradient(58% 52% at 88% 6%, rgba(34, 211, 238, 0.30), transparent 68%),
        radial-gradient(52% 50% at 5% 94%, rgba(168, 85, 247, 0.30), transparent 68%),
        linear-gradient(140deg, #070B24 0%, #251C63 38%, #3B2A8C 62%, #0B5ED7 100%);
    color: #E4ECFF;
}

.section-deep .deep-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.10);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background 0.3s ease;
}

.section-deep .deep-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.55);
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.12), rgba(255, 255, 255, 0.03));
}

.section-deep .deep-canvas {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Gradient metin ── */
.text-gradient {
    background: linear-gradient(100deg, #4F46E5 0%, #0C7FF2 42%, #22D3EE 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Alt kesimlerin kırpılmaması için biraz nefes payı */
    padding-bottom: 0.08em;
}

/* ── Marka kartı: tema rengini --c1 / --c2 üzerinden alır ── */
.brand-tile {
    background-image: linear-gradient(135deg, var(--c1), color-mix(in srgb, var(--c2) 55%, var(--c1)));
    box-shadow: 0 10px 24px -10px var(--c1);
}

.brand-card {
    position: relative;
    transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-card:hover { transform: translateY(-3px); }

.brand-card.active {
    border-color: color-mix(in srgb, var(--c1) 45%, transparent);
    box-shadow: 0 24px 60px -28px var(--c1);
}

/* Açık kartın üstünde ince bir marka rengi şeridi */
.brand-card.active::before {
    content: '';
    position: absolute;
    top: 0; left: 1.75rem; right: 1.75rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--c1), var(--c2), transparent);
}

/* ── Adım zaman çizelgesi ── */
.step-card {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.step-card:hover {
    transform: translateY(-6px);
    border-color: rgba(12, 127, 242, 0.45);
    box-shadow: 0 24px 50px -30px rgba(12, 127, 242, 0.7);
}

.step-badge {
    background-image: linear-gradient(135deg, #4F46E5, #0C7FF2);
    box-shadow: 0 10px 22px -10px rgba(12, 127, 242, 0.9);
}

/* Kartları birbirine bağlayan çizgi (yalnızca geniş ekranda).
   3.75rem = kartın üst iç boşluğu (2rem) + rozetin yarısı (1.75rem);
   yani çizgi tam rozetlerin ortasından geçer. */
@media (min-width: 768px) {
    .step-rail {
        position: absolute;
        top: 3.75rem;
        left: 14%;
        right: 14%;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(12, 127, 242, 0.3) 12%, rgba(12, 127, 242, 0.3) 88%, transparent);
    }
}

/* ── Sayaç ── */
.stat-value { font-variant-numeric: tabular-nums; }

/* ── İstatistik şeridi ── */
.stat-strip {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.65));
    border: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px -34px rgba(15, 23, 42, 0.45);
}

/* ── Başlık: sayfa kaydırılınca yoğunlaşır ── */
.site-header {
    transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
    background-color: rgba(248, 250, 252, 0.96);
    box-shadow: 0 10px 30px -22px rgba(15, 23, 42, 0.55);
    border-color: rgba(226, 232, 240, 1);
}

/* ── Kaydırınca beliren içerik ──
   Gizleme yalnızca <html class="js"> varken uygulanır. O sınıfı head'deki
   küçük bir satır ekler; JS çalışmazsa içerik olduğu gibi görünür kalır. */
.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* Kademeli beliriş gecikmesi hover geçişine sarkmasın. */
.reveal:hover { transition-delay: 0ms; }

/* ── Başlık: kelime kelime perde arkasından çıkar ──
   Bölme işini JS yapar; yapmazsa başlık olduğu gibi durur. */
.word-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.08em;
}

.word-mask > span {
    display: inline-block;
    transform: translateY(105%);
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--wd, 0ms);
}

.words-in .word-mask > span { transform: none; }

/* ── Sonsuz şerit ──
   İçerik JS tarafından bir kez daha kopyalanır; iki kopya yan yana
   kaydığı için dikiş yeri görünmez. */
.marquee {
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeSlide var(--marquee-duration, 38s) linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

@keyframes marqueeSlide {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0 1.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    white-space: nowrap;
}

.marquee-item::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0C7FF2;
    flex-shrink: 0;
}

/* Ayraç noktaları spektrumu sırayla dolaşır. */
.marquee-item:nth-child(4n+2)::after { background: #A855F7; }
.marquee-item:nth-child(4n+3)::after { background: #22D3EE; }
.marquee-item:nth-child(4n+4)::after { background: #FBBF24; }

/* ── İmleci takip eden ışık ──
   --mx/--my JS tarafından yazılır; yoksa kural hiç görünmez. */
[data-spotlight] {
    position: relative;
    isolation: isolate;
}

[data-spotlight]::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    background: radial-gradient(
        320px circle at var(--mx, 50%) var(--my, 50%),
        var(--spot-color, rgba(12, 127, 242, 0.14)),
        transparent 62%);
    z-index: 0;
}

[data-spotlight]:hover::after { opacity: 1; }

/* İçerik ışığın üstünde kalsın */
[data-spotlight] > * { position: relative; z-index: 1; }

.section-deep [data-spotlight] { --spot-color: rgba(34, 211, 238, 0.22); }

/* ── Parlayan birincil düğme ── */
.btn-shine {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-18deg);
    transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.btn-shine:hover::before { left: 130%; }

/* ── Kaydırma ilerleme çubuğu ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, #4F46E5, #0C7FF2, #22D3EE, #A855F7, #FBBF24);
    z-index: 60;
    pointer-events: none;
}

/* ── Film grenli doku: koyu bölümde yüzeyi kırar ── */
.grain::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* Gren hissedilmeli, görülmemeli. */
    opacity: 0.16;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ── Bölüm başlığı altındaki akan çizgi ── */
.heading-flourish {
    display: block;
    width: 62px;
    height: 3px;
    margin: 1rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #4F46E5, #0C7FF2, #22D3EE, #A855F7);
    background-size: 200% 100%;
    animation: flourishShift 4s ease-in-out infinite alternate;
}

@keyframes flourishShift {
    from { background-position: 0% 50%; }
    to   { background-position: 100% 50%; }
}

/* ── CTA oku ── */
.cta-arrow { transition: transform 0.25s ease; }
.group:hover .cta-arrow,
a:hover > .cta-arrow,
button:hover > .cta-arrow { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
    .aurora span,
    .marquee-track,
    .heading-flourish { animation: none; }

    .reveal,
    .reveal.in {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .word-mask > span {
        transform: none;
        transition: none;
    }

    .brand-card:hover,
    .step-card:hover,
    .section-deep .deep-card:hover { transform: none; }

    [data-spotlight]::after,
    .btn-shine::before { display: none; }
}

/* ── Süreç kartlarındaki SVG hareketleri ── */
@keyframes spinGear        { from { transform: rotate(0deg); }   to { transform: rotate(360deg); } }
@keyframes spinGearReverse { from { transform: rotate(0deg); }   to { transform: rotate(-360deg); } }
@keyframes dashLineMove    { to { stroke-dashoffset: -32; } }
@keyframes barGrowA        { 0%, 100% { height: 32%; } 50% { height: 85%; } }
@keyframes barGrowB        { 0%, 100% { height: 75%; } 50% { height: 35%; } }
@keyframes barGrowC        { 0%, 100% { height: 45%; } 50% { height: 95%; } }
@keyframes radarPulse      { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }

.anim-gear {
    transform-origin: 50% 50%;
    animation: spinGear 14s linear infinite;
}

.anim-gear-rev {
    transform-origin: 50% 50%;
    animation: spinGearReverse 10s linear infinite;
}

.anim-dash {
    stroke-dasharray: 6 6;
    animation: dashLineMove 2s linear infinite;
}

/* Taban yükseklikleri şart: yükseklik yalnızca animasyondan gelseydi
   animasyon kapalıyken (reduced-motion) sütunlar hiç görünmezdi. */
.anim-bar-1 { height: 45%; animation: barGrowA 3.2s ease-in-out infinite; }
.anim-bar-2 { height: 70%; animation: barGrowB 2.7s ease-in-out infinite 0.4s; }
.anim-bar-3 { height: 55%; animation: barGrowC 3.8s ease-in-out infinite 0.8s; }

.anim-radar {
    transform-origin: 50% 50%;
    animation: radarPulse 2.4s ease-out infinite;
}

/* ── Akordiyon ── */
.accordion-grid {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item.active .accordion-grid {
    grid-template-rows: 1fr;
}

.accordion-inner {
    overflow: hidden;
    min-height: 0;
}

/* Açık kartın çerçeve/gölgesi marka rengine bağlı olduğu için .brand-card
   kurallarında; burada yalnızca ok ikonu dönüyor. */
.accordion-item.active .chevron-icon {
    transform: rotate(180deg);
    background-image: linear-gradient(135deg, var(--c1), var(--c2));
    border-color: transparent;
    color: #FFFFFF;
}

.accordion-item.active .badge-video-closed { display: none; }
.accordion-item.active .badge-video-open   { display: inline-flex; }
.badge-video-open                          { display: none; }

@media (prefers-reduced-motion: reduce) {
    .neon-border-wrapper,
    .anim-gear,
    .anim-gear-rev,
    .anim-dash,
    .anim-bar-1,
    .anim-bar-2,
    .anim-bar-3,
    .anim-radar {
        animation: none;
    }

    .accordion-grid { transition: none; }
}

/* ── Başvuru listesi ──
   Okunmamış satırlar hem zemin rengi hem de sol kenardaki mavi şeritle
   ayrışır; Tailwind'in hover sınıfıyla çakışmaması için ikisi de burada. */
.app-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.app-row:hover { background-color: #F8FAFC; }

.app-row.app-unread { background-color: #EFF7FD; }
.app-row.app-unread:hover { background-color: #E2EFF8; }

.app-row.app-unread td:first-child {
    box-shadow: inset 3px 0 0 #0C7FF2;
}

/* ── Honeypot ──
   display:none yerine ekran dışına alınıyor: bazı bot'lar gizli alanları
   atlar, konumlandırılmış olanları doldurur. */
.hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Hatalı form alanı ── */
.field-invalid {
    border-color: #E11D48 !important;
    background-color: #FFF1F2 !important;
}

/* ── Zengin metin gövdesi ── */
.rich-body p { margin: 0 0 0.625rem; }
.rich-body p:last-child { margin-bottom: 0; }
.rich-body ul,
.rich-body ol { margin: 0 0 0.625rem 1.1rem; list-style: revert; }
.rich-body a { color: #0C7FF2; text-decoration: underline; }
.rich-body strong { color: #0F172A; }

/* ══════════════════════════════════════════════════════════════
   INLINE EDİTÖR (yalnızca admin oturumunda render edilir)
   ══════════════════════════════════════════════════════════════ */

[data-ae],
[data-ae-rich],
[data-ae-media],
[data-ae-list] {
    position: relative;
    outline: 1px dashed rgba(12, 127, 242, 0.35);
    outline-offset: 3px;
    border-radius: 3px;
    transition: outline-color 0.15s ease, background-color 0.15s ease;
}

[data-ae],
[data-ae-rich],
[data-ae-media] {
    cursor: pointer;
}

[data-ae]:hover,
[data-ae-rich]:hover,
[data-ae-media]:hover {
    outline: 2px solid #0C7FF2;
    background-color: rgba(12, 127, 242, 0.06);
}

/* Liste kapsayıcısı geniş olduğu için yalnızca çerçevesi vurgulanır;
   düzenleme, köşede beliren gezinen düğmeyle açılır. */
[data-ae-list] {
    outline-offset: 8px;
}

[data-ae-list]:hover {
    outline: 2px dashed rgba(12, 127, 242, 0.7);
}

.ae-float-edit {
    position: fixed;
    z-index: 8500;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: #0C7FF2;
    color: #fff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(12, 127, 242, 0.45);
}

.ae-float-edit.show { display: inline-flex; }
.ae-float-edit:hover { background: #0A62BD; }

/* ── Section sıralama çubuğu ── */
.ae-section-wrap { position: relative; }

.ae-sctrl {
    position: sticky;
    top: 5.5rem;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 0 auto;
    transform: translateY(18px);
    padding: 5px 8px;
    border-radius: 999px;
    background: #0F172A;
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}

.ae-sctrl-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.ae-move-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}

.ae-move-btn:hover:not(:disabled) { background: #0C7FF2; }
.ae-move-btn:disabled { opacity: 0.3; cursor: default; }

/* ── Modallar ── */
.ae-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

.ae-modal.open { display: flex; }

.ae-dialog {
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.ae-dialog.wide { max-width: 860px; }

.ae-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #E2E8F0;
}

.ae-dialog-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0F172A;
}

.ae-dialog-head .ae-key {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    color: #94A3B8;
}

.ae-dialog-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
}

.ae-dialog-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #E2E8F0;
    background: #F8FAFC;
}

.ae-dialog-foot .ae-foot-left { margin-right: auto; }

.ae-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ae-btn-primary { background: #0C7FF2; color: #fff; }
.ae-btn-primary:hover { background: #0A62BD; }
.ae-btn-ghost { background: #fff; border-color: #E2E8F0; color: #475569; }
.ae-btn-ghost:hover { background: #F1F5F9; }
.ae-btn-danger { background: #fff; border-color: #FECDD3; color: #E11D48; }
.ae-btn-danger:hover { background: #FFF1F2; }
.ae-btn:disabled { opacity: 0.55; cursor: default; }

.ae-input,
.ae-textarea,
.ae-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    color: #0F172A;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
}

.ae-input:focus,
.ae-textarea:focus,
.ae-select:focus {
    outline: none;
    border-color: #0C7FF2;
    background: #fff;
}

.ae-textarea { min-height: 110px; resize: vertical; }

.ae-field-label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748B;
}

.ae-rte {
    min-height: 180px;
    padding: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    line-height: 1.6;
    overflow-y: auto;
}

.ae-rte:focus { outline: none; border-color: #0C7FF2; }

.ae-rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.ae-rte-toolbar button {
    min-width: 30px;
    padding: 5px 8px;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #fff;
    font-size: 12px;
    color: #334155;
    cursor: pointer;
}

.ae-rte-toolbar button:hover { background: #F1F5F9; }

.ae-error {
    display: none;
    margin-top: 12px;
    padding: 9px 12px;
    border: 1px solid #FECDD3;
    border-radius: 10px;
    background: #FFF1F2;
    color: #E11D48;
    font-size: 12px;
    font-weight: 600;
}

.ae-error.show { display: block; }

/* ── Medya önizleme ── */
.ae-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px dashed #CBD5E1;
    border-radius: 12px;
    background: #F8FAFC;
}

.ae-preview img,
.ae-preview video {
    max-width: 100%;
    max-height: 260px;
    border-radius: 8px;
}

.ae-preview-empty { font-size: 12px; color: #94A3B8; }

/* ── Liste satırları ── */
.ae-list-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    background: #F8FAFC;
}

.ae-list-row-fields {
    display: grid;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.ae-list-row-side {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ae-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
}

.ae-icon-btn:hover:not(:disabled) { background: #F1F5F9; color: #0F172A; }
.ae-icon-btn:disabled { opacity: 0.35; cursor: default; }
.ae-icon-btn.danger:hover { background: #FFF1F2; border-color: #FECDD3; color: #E11D48; }

.ae-media-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #fff;
}

.ae-media-thumb {
    width: 64px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #F1F5F9;
    color: #94A3B8;
    font-size: 10px;
    overflow: hidden;
}

.ae-media-thumb img,
.ae-media-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ae-media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ae-list-empty {
    padding: 28px 12px;
    text-align: center;
    font-size: 12px;
    color: #94A3B8;
}

/* ── Kayıt bildirimi ── */
.ae-toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 9500;
    transform: translate(-50%, 12px);
    padding: 10px 18px;
    border-radius: 999px;
    background: #0F172A;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ae-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.ae-toast.error { background: #E11D48; }

/* ── Kaydedilmemiş değişiklik işareti ── */
.ae-dirty {
    outline: 2px solid #F59E0B !important;
    outline-offset: 3px;
    background-color: rgba(245, 158, 11, 0.1) !important;
    border-radius: 3px;
}

/* ── Alt bar ── */
.ae-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8000;
    padding: 10px 16px;
    background: #0F172A;
    color: #fff;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.28);
}

.ae-bar.dirty {
    background: #0E4A72;
}

.ae-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.ae-bar-hint,
.ae-bar-dirty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
}

.ae-bar-dirty strong {
    font-weight: 800;
    color: #FBBF24;
}

.ae-bar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FBBF24;
    animation: aeBarPulse 1.6s ease-in-out infinite;
}

@keyframes aeBarPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

.ae-bar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ae-bar [hidden] { display: none !important; }

/* Alt bar içeriği kapatmasın. */
body.ae-editing { padding-bottom: 58px; }

@media (prefers-reduced-motion: reduce) {
    .ae-bar-dot { animation: none; }
}
