/* Karflow - Ana Stil Dosyası */

html, body {
    overflow-x: hidden;
    max-width: 100vw;
    /* Uygulama hissi: çift dokunuşta yakınlaştırma yok, iOS yazı büyütmesi kapalı */
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
/* overflow-x:hidden body'yi kaydırma kabı yapar: üst bar ve sol menü (sticky) sayfayla birlikte kayıp gider, menünün altı boş
   kalır (25.11.2026, kullanıcı: "sol menü aşağı kadar gitsin"). clip yana taşmayı yine keser ama kaydırma kabı oluşturmaz. */
@supports (overflow-x: clip) {
    html, body { overflow-x: clip; }
}

/* Geçiş animasyonları */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgb(var(--kf-500, 143 112 25));
    border-radius: 3px;
}

/* OTP input */
.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 0.5rem;
    outline: none;
}
.otp-input:focus {
    border-color: rgb(var(--kf-500, 143 112 25));
    box-shadow: 0 0 0 3px rgb(var(--kf-500, 143 112 25) / 0.2);
}

/* Loader */
.spinner {
    border: 3px solid rgb(var(--kf-500, 143 112 25) / 0.15);
    border-top-color: rgb(var(--kf-500, 143 112 25));
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Gece modu geçişi */
.dark body {
    color-scheme: dark;
}

/* Login sayfası */
.login-bg {
    background: linear-gradient(180deg, #2c2e31 0%, #25272a 40%, #1c1d1f 75%, #141516 100%);
    position: relative;
    overflow: hidden;
}
.login-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgb(var(--kf-400, 201 164 58) / 0.14) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    animation: loginBgMove 20s ease-in-out infinite alternate;
}
@keyframes loginBgMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-3%, -3%) rotate(2deg); }
}

.login-card {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    animation: loginCardIn 0.6s ease-out;
}
.dark .login-card {
    background: rgba(37, 39, 42, 0.95);
}
@keyframes loginCardIn {
    0% { opacity: 0; transform: translateY(30px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.login-glow {
    box-shadow: 0 0 60px rgb(var(--kf-500, 143 112 25) / 0.15), 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Floating particles */
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float linear infinite;
}
@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* Pulse ring */
.pulse-ring {
    animation: pulseRing 3s ease-in-out infinite;
}
@keyframes pulseRing {
    0%, 100% { box-shadow: 0 0 0 0 rgb(var(--kf-500, 143 112 25) / 0.3); }
    50% { box-shadow: 0 0 0 15px rgb(var(--kf-500, 143 112 25) / 0); }
}

/* Logo parıldama efekti */
.logo-shimmer {
    background: linear-gradient(
        90deg,
        #25272a 0%,
        #25272a 35%,
        rgb(var(--kf-500, 143 112 25)) 50%,
        #25272a 65%,
        #25272a 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}
.dark .logo-shimmer {
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #ffffff 35%,
        rgb(var(--kf-400, 201 164 58)) 50%,
        #ffffff 65%,
        #ffffff 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* Leaflet harita */
.leaflet-container { border-radius: 0.75rem; z-index: 1; }
.dark .leaflet-tile { filter: brightness(0.75) invert(1) contrast(1.1) hue-rotate(200deg) saturate(0.3); }
.leaflet-popup-content-wrapper { border-radius: 0.75rem !important; }
.dark .leaflet-popup-content-wrapper { background: #25272a !important; color: #e0e2e5 !important; }
.dark .leaflet-popup-tip { background: #25272a !important; }
.harita-mini { height: 120px; width: 100%; border-radius: 0.5rem; }
.harita-buyuk { height: 300px; width: 100%; border-radius: 0.75rem; }
.harita-modal { height: 250px; width: 100%; border-radius: 0.5rem; }

/* Input focus glow */
.input-glow:focus {
    box-shadow: 0 0 0 3px rgb(var(--kf-500, 143 112 25) / 0.2), 0 0 20px rgb(var(--kf-500, 143 112 25) / 0.1);
}

/* ========== QR GEÇİŞ MODAL ========== */
.qr-modal-kutu {
    animation: qrModalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Dark modda bile QR modal DAİMA beyaz kalacak - QR okuyucu uyumluluğu */
.dark .qr-modal-kutu {
    background: #ffffff !important;
    color: #1e293b !important;
}
.dark .qr-modal-kutu h3 { color: #1e293b !important; }
.dark .qr-modal-kutu p { color: #64748b !important; }
.dark .qr-modal-kutu .text-gray-600 { color: #475569 !important; }
.dark .qr-modal-kutu .text-gray-400 { color: #94a3b8 !important; }
.dark .qr-modal-kutu .bg-gray-100 { background: #f1f5f9 !important; }

.qr-kod-alani {
    width: 220px;
    height: 220px;
    background: #ffffff;
    border-radius: 1rem;
    border: 2px solid #f1f5f9;
    padding: 12px;
}
.qr-kod-alani canvas,
.qr-kod-alani img {
    width: 100% !important;
    height: 100% !important;
    image-rendering: pixelated;
}

@keyframes qrModalIn {
    0% { opacity: 0; transform: scale(0.85) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ========== ONAY KUTUSU ========== */
.kf-onay-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: background 0.25s ease;
}
.kf-onay-overlay.kf-onay-aktif {
    background: rgba(0, 0, 0, 0.45);
}
.dark .kf-onay-overlay.kf-onay-aktif {
    background: rgba(0, 0, 0, 0.65);
}

.kf-onay-kutu {
    background: #fff;
    border-radius: 1.25rem;
    padding: 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: scale(0.85) translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
.dark .kf-onay-kutu {
    background: #25272a;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.kf-onay-overlay.kf-onay-aktif .kf-onay-kutu {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Kapanma animasyonu */
.kf-onay-overlay.kf-onay-kapaniyor {
    background: rgba(0, 0, 0, 0);
}
.kf-onay-overlay.kf-onay-kapaniyor .kf-onay-kutu {
    transform: scale(0.9) translateY(10px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.15s ease;
}

.kf-onay-ikon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    position: relative;
}
.kf-onay-ikon.kf-onay-tehlike {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #ef4444;
}
.dark .kf-onay-ikon.kf-onay-tehlike {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.25));
}
.kf-onay-ikon.kf-onay-uyari {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #f59e0b;
}
.dark .kf-onay-ikon.kf-onay-uyari {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.25));
}
.kf-onay-ikon.kf-onay-bilgi {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0ea5e9;
}
.dark .kf-onay-ikon.kf-onay-bilgi {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(14, 165, 233, 0.25));
}
.kf-onay-ikon i {
    font-size: 1.25rem;
}
/* Pulse halka */
.kf-onay-ikon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.15;
    animation: kfOnayPulse 2s ease-in-out infinite;
}
@keyframes kfOnayPulse {
    0%, 100% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(1.1); opacity: 0.05; }
}

.kf-onay-baslik {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}
.dark .kf-onay-baslik {
    color: #f1f5f9;
}

.kf-onay-mesaj {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.dark .kf-onay-mesaj {
    color: #94a3b8;
}

.kf-onay-butonlar {
    display: flex;
    gap: 0.75rem;
}
.kf-onay-butonlar button {
    flex: 1;
    padding: 0.65rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.kf-onay-iptal {
    background: #f1f5f9;
    color: #64748b;
}
.kf-onay-iptal:hover {
    background: #e2e8f0;
    color: #475569;
}
.dark .kf-onay-iptal {
    background: #334155;
    color: #94a3b8;
}
.dark .kf-onay-iptal:hover {
    background: #3a4049;
    color: #cbd5e1;
}

.kf-onay-onayla {
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.kf-onay-onayla:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}
.kf-onay-onayla.kf-btn-tehlike {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
.kf-onay-onayla.kf-btn-tehlike:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}
.kf-onay-onayla.kf-btn-uyari {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}
.kf-onay-onayla.kf-btn-uyari:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}
.kf-onay-onayla.kf-btn-karflow {
    background: linear-gradient(135deg, rgb(var(--kf-500, 143 112 25)), rgb(var(--kf-600, 122 95 20)));
}
.kf-onay-onayla.kf-btn-karflow:hover {
    background: linear-gradient(135deg, rgb(var(--kf-600, 122 95 20)), rgb(var(--kf-700, 99 77 16)));
}

/* ============================================
   SELECT OKU
   Proje kuralı: select ve input AYNI class'ı kullanır ($ic / $sc).
   Farkı yalnızca `appearance-none` yaratır; tarayıcının yerleşik oku
   kaybolduğu için ok buradan çizilir. Böylece select'ler input'larla
   birebir aynı çerçeve/padding'e sahip olur ama açılır olduğu belli olur.
   ============================================ */
select.appearance-none {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 0.7rem auto;
    padding-right: 2.25rem;
}

.dark select.appearance-none {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239ca3af' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Yükleme ekranı stilleri sablon/header.php içinde inline tutulur
   (ilk boyamada hazır olmaları gerekir — tek kaynak orasıdır). */


/* ========== TABLOLAR (sayfalardaki tüm liste tabloları) ==========
   <table class="w-full text-sm"> tabloları belirgin olsun: koyu başlık ve sütun ayraçları,
   görünür satır çizgileri, zebra, üzerine gelince altın ton. Çizgiler hücrede (td) durur,
   Tailwind'in divide-* sınıflarıyla çakışmaz. Zebra :where() ile sıfır özgüllükte:
   satırın kendi vurgu rengi (bekliyor, bana yönlendirilen vb.) her zaman kazanır. */
table.w-full.text-sm > thead > tr > th {
    background-color: #f1efe9;
    color: #4b4b47;
    font-weight: 600;
    border-bottom: 2px solid #ddd9cf;
}
table.w-full.text-sm > thead > tr > th + th {
    border-left: 1px solid #e3dfd5;
}
table.w-full.text-sm > tbody > tr > td {
    border-bottom: 1px solid #ebe8e1;
}
table.w-full.text-sm > tbody > tr:last-child > td {
    border-bottom: 0;
}
:where(table.w-full.text-sm > tbody > tr:nth-child(even)) {
    background-color: #faf9f6;
}
table.w-full.text-sm > tbody > tr:hover {
    background-color: rgb(var(--kf-500, 143 112 25) / 0.06);
}
.dark table.w-full.text-sm > thead > tr > th {
    background-color: #1c1d1f;
    color: #d4d4d1;
    border-bottom-color: #3a3b3d;
}
.dark table.w-full.text-sm > thead > tr > th + th {
    border-left-color: #333437;
}
.dark table.w-full.text-sm > tbody > tr > td {
    border-bottom-color: #333437;
}
.dark :where(table.w-full.text-sm > tbody > tr:nth-child(even)) {
    background-color: rgba(255, 255, 255, 0.025);
}
.dark table.w-full.text-sm > tbody > tr:hover {
    background-color: rgb(var(--kf-400, 201 164 58) / 0.08);
}
/* Vurgulu satırın sol altın çizgisi (border-l-karflow) tbody'deki divide-* rengine yenik
   düşüyordu; görünür olsun */
table.w-full.text-sm > tbody > tr.border-l-karflow {
    border-left-color: rgb(var(--kf-500, 143 112 25));
}
/* Satırlarda da sütun araları çizgili (başlıktaki ayraçların devamı) */
table.w-full.text-sm > tbody > tr > td + td {
    border-left: 1px solid #ebe8e1;
}
.dark table.w-full.text-sm > tbody > tr > td + td {
    border-left-color: #333437;
}

/* Mobilde form alanına dokununca yakınlaşma olmasın (07.11.2026, kullanıcı: "mobilde hiçbir inputa basınca zoom
   olmasın"). iPhone, odaklanılan alanın yazısı 16px'ten küçükse sayfayı büyütür; dokunmatik ekranlarda form alanları
   16px. Parmakla yakınlaştırma (erişilebilirlik) kapanmaz; masaüstü (fare) etkilenmez. */
@media (hover: none) and (pointer: coarse) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select, textarea { font-size: 16px !important; }
}


/* SOL MENÜ GRUPLARI (07.11.2026, sablon/header.php): katlanır gruplar. Gövde grid satırıyla açılır/kapanır
   (yükseklik bilinmeden yumuşak geçiş); açılışta geçiş yok (.kf-menu-hazir sonradan eklenir). */
.kf-mg-govde { display: grid; grid-template-rows: 0fr; }
.kf-mg-govde > div { overflow: hidden; min-height: 0; }
.kf-mg[data-acik="1"] > .kf-mg-govde { grid-template-rows: 1fr; }
.kf-mg-ok { transition: transform .2s ease; }
.kf-mg[data-acik="1"] .kf-mg-ok { transform: rotate(90deg); }
.kf-mg[data-acik="1"] .kf-mg-toplam { display: none; }   /* açıkken toplam yerine kalemlerin kendi rozetleri */
.kf-menu-hazir .kf-mg-govde { transition: grid-template-rows .22s ease; }
/* İnce kaydırma çubuğu (menü) */
.kf-ince-kaydirma { scrollbar-width: thin; scrollbar-color: rgba(127,127,127,.25) transparent; }
.kf-ince-kaydirma::-webkit-scrollbar { width: 6px; }
.kf-ince-kaydirma::-webkit-scrollbar-thumb { background: rgba(127,127,127,.25); border-radius: 3px; }
.kf-ince-kaydirma::-webkit-scrollbar-track { background: transparent; }
