﻿:root {
    --renk-lacivert: #1e3a5f;
    --renk-altin: #c9a961;
    --renk-altin-koyu: #b8923f;
    --renk-arka: #f0f4f8;
}

/* ===== GENEL ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background: var(--renk-arka);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ===== NAVBAR ===== */
.navbar-custom {
    background: var(--renk-lacivert);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

    .navbar-custom .navbar-brand {
        color: #fff !important;
        font-weight: 700;
        font-size: 1.1rem;
    }

    .navbar-custom .nav-link {
        color: rgba(255,255,255,0.85) !important;
        transition: color 0.2s;
        font-size: 0.9rem;
    }

        .navbar-custom .nav-link:hover {
            color: var(--renk-altin) !important;
        }

.navbar-toggler-icon {
    filter: invert(1);
}

/* ===== KARTLAR ===== */
.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

    .card:hover {
        box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    }

.card-header-lacivert {
    background: var(--renk-lacivert);
    color: #fff;
    border-radius: 14px 14px 0 0 !important;
    padding: 1.25rem 1.5rem;
}

/* ===== BUTONLAR ===== */
.btn-altin {
    background: var(--renk-altin);
    color: #fff;
    border: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}

    .btn-altin:hover {
        background: var(--renk-altin-koyu);
        color: #fff;
        transform: translateY(-1px);
    }

    .btn-altin:active {
        transform: translateY(0);
    }

/* ===== FORM ===== */
.form-control:focus {
    border-color: var(--renk-altin);
    box-shadow: 0 0 0 0.2rem rgba(201,169,97,0.25);
}

.form-check-input:checked {
    background-color: var(--renk-lacivert);
    border-color: var(--renk-lacivert);
}

/* ===== ALERT ===== */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-info {
    background: #e8f4fd;
    color: #1a5276;
}

.alert-danger {
    background: #fdecea;
    color: #922b21;
}

.alert-success {
    background: #eafaf1;
    color: #1e8449;
}

/* ===== FOOTER ===== */
footer {
    background: var(--renk-lacivert);
    color: rgba(255,255,255,0.8);
    padding: 1rem 0;
    margin-top: auto;
    font-size: 0.85rem;
}

/* ===== BADGE ===== */
.badge-lacivert {
    background: var(--renk-lacivert);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.badge-altin {
    background: var(--renk-altin);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* ===== TABLO ===== */
.table-hover tbody tr:hover {
    background: rgba(201,169,97,0.08);
}

.table th {
    background: var(--renk-lacivert);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
}

/* ===== PWA INSTALL BANNER ===== */
#pwaInstallBanner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--renk-lacivert);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    white-space: nowrap;
}

    #pwaInstallBanner.show {
        display: flex;
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .card-body {
        padding: 1.25rem !important;
    }

    h2 {
        font-size: 1.4rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    .btn-lg {
        font-size: 0.95rem;
        padding: 0.6rem 1rem;
    }
}

/* ===== LOADING SPINNER ===== */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

    .btn-loading::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
        border: 2px solid rgba(255,255,255,0.4);
        border-top-color: #fff;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
    }

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* ===== ADMIN SIDEBAR ===== */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--renk-lacivert);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

    .sidebar .brand {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        color: #fff;
        font-weight: 700;
    }

    .sidebar .nav-link {
        color: rgba(255,255,255,0.75);
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
        transition: all 0.2s;
        border-left: 3px solid transparent;
    }

        .sidebar .nav-link:hover,
        .sidebar .nav-link.active {
            color: #fff;
            background: rgba(201,169,97,0.15);
            border-left-color: var(--renk-altin);
        }

        .sidebar .nav-link i {
            width: 20px;
            text-align: center;
        }

.main-content {
    margin-left: 260px;
    padding: 1.5rem;
    transition: margin 0.3s ease;
}

.topbar {
    background: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

/* Stat kartları */
.stat-card {
    border-radius: 14px;
    padding: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

    .stat-card .stat-icon {
        position: absolute;
        right: 16px;
        bottom: 10px;
        font-size: 3.5rem;
        opacity: 0.15;
    }

.stat-card-lacivert {
    background: var(--renk-lacivert);
}

.stat-card-altin {
    background: var(--renk-altin);
}

.stat-card-yesil {
    background: #1e8449;
}

.stat-card-kirmizi {
    background: #922b21;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-260px);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0;
    }
}
/* ===== HATA KUTUSU ===== */
.hata-kutusu {
    background: #fff5f5;
    border: 1px solid #fca5a5;
    border-left: 4px solid #ef4444;
    border-radius: 10px;
    overflow: hidden;
}

.hata-baslik {
    background: #fef2f2;
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 16px;
    border-bottom: 1px solid #fca5a5;
}

.hata-liste {
    padding: 10px 16px 10px 32px;
    margin: 0;
    color: #dc2626;
    font-size: 0.875rem;
}

    .hata-liste li {
        padding: 2px 0;
    }

.alan-hata {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

    .alan-hata::before {
        content: '⚠ ';
    }

/* ===== BİLGİ KUTUSU ===== */
.bilgi-kutusu {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.bilgi-ikon {
    color: #3b82f6;
    font-size: 1.25rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.bilgi-baslik {
    font-weight: 600;
    color: #1e40af;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.bilgi-metin {
    color: #1d4ed8;
    font-size: 0.875rem;
}

/* ===== KULLANICI TİP KARTI ===== */
.tip-kart {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #6b7280;
    position: relative;
    overflow: hidden;
}

    .tip-kart:hover {
        border-color: var(--renk-altin);
        color: var(--renk-lacivert);
        background: #fdfaf4;
    }

    .tip-kart.secili {
        border-color: var(--renk-lacivert);
        background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
        color: var(--renk-lacivert);
        font-weight: 700;
        box-shadow: 0 2px 8px rgba(30,58,95,0.15);
    }

        /* Seçili işareti — sağ üst köşe */
        .tip-kart.secili::after {
            content: '✓';
            position: absolute;
            top: 0;
            right: 0;
            background: var(--renk-lacivert);
            color: #fff;
            font-size: 0.7rem;
            font-weight: 700;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 0 8px 0 8px;
        }

    /* Sol kenar çizgisi */
    .tip-kart.secili {
        border-left: 4px solid var(--renk-altin);
    }

    .tip-kart i {
        font-size: 1.2rem;
        transition: transform 0.2s;
    }

    .tip-kart.secili i {
        transform: scale(1.2);
        color: var(--renk-altin);
    }

/* ===== INPUT GRUP ===== */
.input-grup {
    position: relative;
}

.input-ikon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 1;
    font-size: 1rem;
}

/* ===== KOD INPUT ===== */
.kod-input {
    letter-spacing: 12px;
    font-size: 1.75rem;
    font-weight: 700;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    transition: border-color 0.2s;
}

    .kod-input:focus {
        border-color: var(--renk-altin);
        box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.2);
    }

/* ===== GERİ SAYIM ===== */
.geri-sayim-kutu {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
}

#geriSayim {
    color: var(--renk-lacivert);
}

    #geriSayim.sureDoldu {
        color: #ef4444;
    }

/* ===== KALAN SÜRE GÖSTERGESİ ===== */
.sure-gostergesi {
    display: flex;
    align-items: center;
    background: #f0f4f8;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e3a5f;
    transition: all 0.3s;
    min-width: 85px;
    justify-content: center;
}

    .sure-gostergesi.uyari {
        background: #fffbeb;
        border-color: #fcd34d;
        color: #d97706;
    }

    .sure-gostergesi.kritik {
        background: #fef2f2;
        border-color: #fca5a5;
        color: #dc2626;
        animation: nabiz 1s infinite;
    }

@keyframes nabiz {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}