/* ==========================================================================
   SB Admin 2 - Modern UI Overrides (Final Integrated Version)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL & TYPOGRAPHY
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    background-color: #f8fafc !important;
    background-image: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    color: #334155 !important;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

label {
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.4rem;
}

/* --------------------------------------------------------------------------
   2. SIDEBAR RESTYLING
   -------------------------------------------------------------------------- */
.sidebar {
    background: #0f172a !important;
    background-image: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05) !important;
}

.sidebar-brand {
    height: 4.5rem !important;
    letter-spacing: -0.01em;
}

.sidebar-brand-text {
    font-weight: 700 !important;
    text-transform: capitalize !important;
    font-size: 1.1rem;
}

.sidebar .nav-item {
    margin: 2px 8px;
}

    .sidebar .nav-item .nav-link {
        color: #94a3b8 !important;
        border-radius: 0.5rem;
        padding: 0.75rem 1rem !important;
        transition: background 0.2s, color 0.2s;
    }

        .sidebar .nav-item .nav-link i {
            color: #64748b !important;
            transition: color 0.2s;
        }

        .sidebar .nav-item .nav-link:hover,
        .sidebar .nav-item.active .nav-link {
            color: #ffffff !important;
            background-color: rgba(255, 255, 255, 0.08) !important;
        }

            .sidebar .nav-item .nav-link:hover i,
            .sidebar .nav-item.active .nav-link i {
                color: #38bdf8 !important;
            }

.sidebar-heading {
    color: #64748b !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.05em !important;
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Sidebar Dropdown (Collapse) */
.sidebar .nav-item .collapse-inner {
    background: #1e293b !important;
    border-radius: 0.5rem;
    padding: 0.5rem 0;
}

    .sidebar .nav-item .collapse-inner .collapse-item {
        color: #cbd5e1 !important;
        border-radius: 0.375rem;
        margin: 2px 8px;
        font-weight: 500;
    }

        .sidebar .nav-item .collapse-inner .collapse-item:hover,
        .sidebar .nav-item .collapse-inner .collapse-item.active {
            background: rgba(255, 255, 255, 0.1) !important;
            color: #38bdf8 !important;
        }

/* Sidebar İçi Form & Kart Elemanları Uyumlaştırması */
.sidebar .form-control {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

    .sidebar .form-control::placeholder {
        color: #94a3b8 !important;
    }

.sidebar .card {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

.sidebar .card-body {
    color: #cbd5e1 !important;
}

/* --------------------------------------------------------------------------
   3. TOPBAR RESTYLING
   -------------------------------------------------------------------------- */
.topbar {
    height: 4.5rem !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02) !important;
}

    .topbar .dropdown-menu {
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08) !important;
        border-radius: 0.75rem !important;
        padding: 0.5rem !important;
    }

    .topbar .nav-item .nav-link .img-profile {
        width: 2.3rem !important;
        height: 2.3rem !important;
        border: 2px solid #e2e8f0;
    }

/* --------------------------------------------------------------------------
   4. FORM ELEMANLARI (Yazı Kesilmeleri Önlenmiş)
   -------------------------------------------------------------------------- */
.form-control,
select.form-control,
.input-group .form-control {
    height: auto !important;
    min-height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    border-radius: 0.5rem !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    background-color: #ffffff;
}

    .form-control:focus {
        border-color: #3b82f6 !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    }

/* --------------------------------------------------------------------------
   5. KARTLAR VE KART İÇİ HREFLER
   -------------------------------------------------------------------------- */
.card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    background-color: #ffffff !important;
}

    .card:hover {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04) !important;
    }

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 1rem 1.25rem !important;
}

    .card-header h6 {
        font-weight: 700 !important;
        color: #0f172a !important;
    }

/* Kart İçi Bağlantılar (a href) */
.card a:not(.btn):not(.dropdown-item) {
    color: #0f172a !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.2s ease, text-decoration 0.2s ease !important;
}

    .card a:not(.btn):not(.dropdown-item):hover {
        color: #0284c7 !important;
        text-decoration: underline !important;
    }

.card-header a:not(.btn) {
    color: #0f172a !important;
    font-weight: 700;
}

    .card-header a:not(.btn):hover {
        color: #0284c7 !important;
    }

/* Left Accent Border Cards */
.border-left-primary {
    border-left: 0.25rem solid #0f172a !important;
}

.border-left-success {
    border-left: 0.25rem solid #10b981 !important;
}

.border-left-info {
    border-left: 0.25rem solid #0ea5e9 !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f59e0b !important;
}

.border-left-danger {
    border-left: 0.25rem solid #e11d48 !important;
}

/* --------------------------------------------------------------------------
   6. BUTONLAR (Tüm Varyasyonlar)
   -------------------------------------------------------------------------- */
.btn {
    border-radius: 0.5rem !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    line-height: 1.5 !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

    .btn:hover {
        transform: translateY(-1px);
    }

    .btn:active, .btn.active {
        transform: translateY(0);
    }

/* Primary (Sidebar Koyu Slate & Accent Mavi) */
.btn-primary {
    background-color: #0f172a !important;
    border-color: #0f172a !important;
    color: #ffffff !important;
}

    .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active,
    .show > .btn-primary.dropdown-toggle {
        background-color: #0284c7 !important;
        border-color: #0284c7 !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3) !important;
    }

/* Danger (Modern Rose/Kırmızı) */
.btn-danger {
    background-color: #e11d48 !important;
    border-color: #e11d48 !important;
    color: #ffffff !important;
}

    .btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active,
    .show > .btn-danger.dropdown-toggle {
        background-color: #be123c !important;
        border-color: #be123c !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3) !important;
    }

/* Success (Modern Emerald/Yeşil) */
.btn-success {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

    .btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active,
    .show > .btn-success.dropdown-toggle {
        background-color: #059669 !important;
        border-color: #059669 !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    }

/* Warning (Modern Amber/Turuncu-Sarı) */
.btn-warning {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
}

    .btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active,
    .show > .btn-warning.dropdown-toggle {
        background-color: #d97706 !important;
        border-color: #d97706 !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
    }

/* Info (Modern Sky Cyan) */
.btn-info {
    background-color: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
}

    .btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active,
    .show > .btn-info.dropdown-toggle {
        background-color: #0284c7 !important;
        border-color: #0284c7 !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3) !important;
    }

/* Secondary (Slate Gri) */
.btn-secondary {
    background-color: #64748b !important;
    border-color: #64748b !important;
    color: #ffffff !important;
}

    .btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active, .btn-secondary.active,
    .show > .btn-secondary.dropdown-toggle {
        background-color: #475569 !important;
        border-color: #475569 !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(100, 116, 139, 0.25) !important;
    }

/* Light (Açık Nötr Gri) */
.btn-light {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

    .btn-light:hover, .btn-light:focus, .btn-light:active, .btn-light.active,
    .show > .btn-light.dropdown-toggle {
        background-color: #e2e8f0 !important;
        border-color: #cbd5e1 !important;
        color: #0f172a !important;
    }

/* Dark (Koyu Slate) */
.btn-dark {
    background-color: #1e293b !important;
    border-color: #1e293b !important;
    color: #ffffff !important;
}

    .btn-dark:hover, .btn-dark:focus, .btn-dark:active, .btn-dark.active,
    .show > .btn-dark.dropdown-toggle {
        background-color: #0f172a !important;
        border-color: #0f172a !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3) !important;
    }

/* Outline (Çerçeveli) Butonlar */
.btn-outline-primary {
    color: #0f172a !important;
    border-color: #0f172a !important;
}

    .btn-outline-primary:hover {
        background-color: #0f172a !important;
        color: #ffffff !important;
    }

.btn-outline-danger {
    color: #e11d48 !important;
    border-color: #e11d48 !important;
}

    .btn-outline-danger:hover {
        background-color: #e11d48 !important;
        color: #ffffff !important;
    }

.btn-outline-success {
    color: #10b981 !important;
    border-color: #10b981 !important;
}

    .btn-outline-success:hover {
        background-color: #10b981 !important;
        color: #ffffff !important;
    }

.btn-outline-warning {
    color: #d97706 !important;
    border-color: #f59e0b !important;
}

    .btn-outline-warning:hover {
        background-color: #f59e0b !important;
        color: #ffffff !important;
    }

.btn-outline-info {
    color: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
}

    .btn-outline-info:hover {
        background-color: #0ea5e9 !important;
        color: #ffffff !important;
    }

.btn-outline-secondary {
    color: #64748b !important;
    border-color: #cbd5e1 !important;
}

    .btn-outline-secondary:hover {
        background-color: #64748b !important;
        color: #ffffff !important;
    }

/* --------------------------------------------------------------------------
   7. BADGES (BOOTSTRAP 4 & 5 UYUMLU SOFT ROZETLER)
   -------------------------------------------------------------------------- */
.badge {
    border-radius: 0.375rem !important;
    padding: 0.4em 0.7em !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

    /* Soft Success (Yeşil) */
    .badge.bg-success,
    .badge-success {
        background-color: #dcfce7 !important;
        color: #15803d !important;
        border: 1px solid #bbf7d0 !important;
    }

    /* Soft Danger (Kırmızı) */
    .badge.bg-danger,
    .badge-danger {
        background-color: #fee2e2 !important;
        color: #b91c1c !important;
        border: 1px solid #fecaca !important;
    }

    /* Soft Primary */
    .badge.bg-primary,
    .badge-primary {
        background-color: #e0f2fe !important;
        color: #0369a1 !important;
        border: 1px solid #bae6fd !important;
    }

    /* Soft Warning */
    .badge.bg-warning,
    .badge-warning {
        background-color: #fef3c7 !important;
        color: #b45309 !important;
        border: 1px solid #fde68a !important;
    }

    /* Soft Secondary */
    .badge.bg-secondary,
    .badge-secondary {
        background-color: #f1f5f9 !important;
        color: #475569 !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Yuvarlatılmış (Pill) Rozetler */
    .badge.rounded-pill,
    .badge-pill {
        border-radius: 50rem !important;
        padding-left: 0.8em !important;
        padding-right: 0.8em !important;
    }

/* --------------------------------------------------------------------------
   8. MODAL & MODAL HEADER (bg-primary UYUMLU)
   -------------------------------------------------------------------------- */
.modal-content {
    border-radius: 0.85rem !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.1rem 1.5rem !important;
}

    /* Modal Header bg-primary -> Sidebar Koyu Slate Tonu */
    .modal-header.bg-primary {
        background-color: #0f172a !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

        .modal-header.bg-primary .modal-title,
        .modal-header.bg-primary h5,
        .modal-header.bg-primary h6 {
            color: #ffffff !important;
            font-weight: 600 !important;
        }

        /* Modal Kapatma (X) Butonu */
        .modal-header.bg-primary .close,
        .modal-header.bg-primary .btn-close {
            color: #ffffff !important;
            opacity: 0.8;
            text-shadow: none !important;
            filter: brightness(0) invert(1);
            transition: opacity 0.2s ease !important;
        }

            .modal-header.bg-primary .close:hover,
            .modal-header.bg-primary .btn-close:hover {
                opacity: 1 !important;
            }

.modal-body {
    padding: 1.5rem !important;
    color: #334155;
}

.modal-footer {
    border-top: 1px solid #f1f5f9 !important;
    padding: 1rem 1.5rem !important;
    background-color: #f8fafc;
}

/* --------------------------------------------------------------------------
   9. TABLOLAR & DİĞER BİLEŞENLER
   -------------------------------------------------------------------------- */
.table {
    color: #334155 !important;
}

    .table thead th {
        background-color: #f8fafc !important;
        border-bottom: 1px solid #e2e8f0 !important;
        color: #64748b !important;
        font-size: 0.75rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        font-weight: 700 !important;
        padding: 0.85rem 1rem !important;
    }

    .table td {
        padding: 0.9rem 1rem !important;
        vertical-align: middle !important;
        border-top: 1px solid #f1f5f9 !important;
    }

.table-hover tbody tr:hover {
    background-color: #f8fafc !important;
}

.dropdown-item {
    border-radius: 0.375rem !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.85rem !important;
    color: #475569 !important;
}

    .dropdown-item:hover {
        background-color: #f1f5f9 !important;
        color: #0f172a !important;
    }

.scroll-to-top {
    border-radius: 50% !important;
    background: #0f172a !important;
}

    .scroll-to-top:hover {
        background: #0284c7 !important;
    }

footer.sticky-footer {
    background-color: transparent !important;
    border-top: 1px solid #e2e8f0 !important;
}
