:root {
    --bg-dark: #1e1e1e;
    --bg-darker: #161616;
    --bg-card: #252525;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent: #4a9eff;
    --accent-hover: #3a8eef;
    --border-color: #333;
    --sidebar-width: 250px;
    --sidebar-collapsed: 70px;
    --topnav-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Top Navigation */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topnav-height);
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
}

.brand i {
    color: var(--accent);
    font-size: 1.5rem;
}

.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-icon-btn {
    text-decoration: none;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.nav-icon-btn:hover {
    background-color: var(--bg-card);
    color: var(--accent);
}

.nav-icon-btn .badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.65rem;
}

.hamburger {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    width: var(--sidebar-collapsed);
    height: calc(100vh - var(--topnav-height));
    background-color: var(--bg-darker);
    border-right: 1px solid var(--border-color);
    transition: width 0.3s ease;
    overflow: hidden;
    z-index: 999;
}

.sidebar:hover {
    width: var(--sidebar-width);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-item {
    margin: 0.25rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.sidebar-link:hover {
    background-color: var(--bg-card);
    color: var(--accent);
}

.sidebar-link.active {
    background-color: var(--bg-card);
    color: var(--accent);
    border-right: 3px solid var(--accent);
}

.sidebar-link i {
    font-size: 1.25rem;
    min-width: 24px;
    margin-right: 1rem;
}

.sidebar-link span {
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar:hover .sidebar-link span {
    opacity: 1;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-collapsed);
    margin-top: var(--topnav-height);
    padding: 2rem;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - var(--topnav-height));
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.25rem;
}

/* Table */
.table {
    color: var(--text-primary);
}

.table thead th {
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.75rem;
}

.table tbody td {
    border-bottom: 1px solid var(--border-color);
    padding: 0.60rem 0.75rem;
}

.table tbody tr:hover {
    background-color: rgba(74, 158, 255, 0.05);
}

.badge {
    padding: 0.375rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

    /* --- Tablo Tasarımı --- */
    .custom-dark-table {
        background-color: #2c3034;
        vertical-align: middle;
        text-align: center;
        font-size: 0.9rem;
        border-color: #454d55;
        color: #ffffff !important;
    }
    .custom-dark-table thead th {
        background-color: #212529;
        border-color: #454d55;
        font-weight: 500;
        padding: 12px;
        color: #ffffff;
    }
    .custom-dark-table tbody td {
        background-color: #2c3034;
        border-color: #373b3e;
        color: #ffffff;
    }
    .table-title-blue {
        color: #3498db !important;
        font-weight: 600;
        text-align: left;
    }

/* --- ÖZEL RADIO BUTON TASARIMI (CSS TRICK) --- */
    
    /* 1. Gerçek input'u gizle */
    .custom-radio-input {
        display: none; 
    }

    /* 2. Label'ı buton gibi göster (Kare görünüm) */
    .custom-radio-label {
        width: 18px;
        height: 18px;
        background-color: #fff; /* İçi boşken beyaz */
        border: 2px solid #ced4da;
        border-radius: 4px; /* Hafif oval köşeler */
        display: inline-block;
        cursor: pointer;
        vertical-align: middle;
        transition: all 0.2s ease;
        position: relative;
    }

    /* Hover efekti */
    .custom-radio-label:hover {
        border-color: #3498db;
        transform: scale(1.1);
    }

    /* 3. Input SEÇİLİ (checked) olduğunda Label'ın değişimi */
    .custom-radio-input:checked + .custom-radio-label {
        background-color: #3498db; /* Mavi dolgu */
        border-color: #3498db;
        box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    }
    
    /* Konum Yazısı */
    .text-location {
        color: #e0e0e0; font-size: 0.9rem;
    }

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin-top: 1rem;
}

/* Custom CSS (e.g., in styles.css) */
.nav-aware-center {
    /* 1. Calculate height of the space below the navbar */
    min-height: calc(100vh - 200px); 
    
    /* 2. Push the content down by the navbar's height */
    /* margin-top: 56px;  */
    
    /* 3. Keep Flexbox for centering */
    display: flex;
    justify-content: center;
    align-items: center;
}

    .image-grid-item {
        position: relative;
        width: 100%;
        aspect-ratio: 4 / 3; 
        background-color: #000;
        border: 1px solid #333;
        border-radius: 6px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .image-grid-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.8;
        transition: 0.3s;
    }
    .image-grid-item:hover img {
        opacity: 1;
        transform: scale(1.05);
    }

/* Mobile Styles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .brand-text {
        display: none;
    }

    .sidebar {
        width: 0;
        border: none;
    }

    .sidebar.show {
        width: var(--sidebar-width);
    }

    .sidebar.show .sidebar-link span {
        opacity: 1;
    }

    .main-content {
        margin-left: 0;
    }

    .top-nav-actions .nav-icon-btn span {
        display: none;
    }

    .overlay {
        display: none;
        position: fixed;
        top: var(--topnav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    .overlay.show {
        display: block;
    }
}

@media (min-width: 769px) {
    .sidebar:hover ~ .main-content {
        margin-left: var(--sidebar-width);
    }
}