/* Ana Stilller */
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f2f5f9;
    color: #2c3e50;
}

.navbar {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar {
    background-color: #ffffff;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.08);
    min-height: calc(100vh - 56px);
    z-index: 100;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

/* Kart Stilleri */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #334155;
    margin-bottom: 15px;
}

/* Yeni Dashboard Kartı Stilleri */
.dashboard-card {
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background-color: #ffffff;
}

.card-stats {
    margin-top: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: #64748b;
}

.stat-value {
    font-weight: 600;
    font-size: 1.2rem;
}

/* Cihaz Listeleri */
.device-list {
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.device-list .list-group-item {
    cursor: pointer;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    margin-bottom: 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid #f1f5f9;
}

.device-list .list-group-item:hover {
    background-color: #f8fafc;
    border-left-color: #3b82f6;
}

.device-list .list-group-item.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.device-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
}

.device-status.online {
    background-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.device-status.offline {
    background-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.device-mac {
    font-size: 0.75rem;
    color: #64748b;
    font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    margin-top: 3px;
}

/* Tab Stilleri */
.nav-tabs {
    border-bottom: 1px solid #e5e7eb;
}

.nav-tabs .nav-link {
    color: #64748b;
    font-weight: 500;
    padding: 0.7rem 1.25rem;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: #334155;
    border-bottom-color: #cbd5e1;
}

.nav-tabs .nav-link.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: transparent;
}

/* Buton Stilleri */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
}

.btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-light {
    background-color: #ffffff;
    border-color: #e5e7eb;
    color: #334155;
}

.btn-light:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.btn-sm {
    border-radius: 6px;
    font-size: 0.825rem;
}

/* Form Stilleri */
.input-group-text {
    color: #64748b;
}

.form-control::placeholder {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Harita Görünümü */
.map-container {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
    padding: 15px;
    height: 600px;
    position: relative;
    overflow: hidden;
}

#map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

#map-canvas {
    width: 100%;
    height: 100%;
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1v1H0V0zm1 0h1v1H1V0zm1 0h1v1H2V0zm1 0h1v1H3V0zM0 1h1v1H0V1zm4 0h1v1H4V1zM0 2h1v1H0V2zm4 0h1v1H4V2zM0 3h1v1H0V3zm4 0h1v1H4V3zM0 4h1v1H0V4zm1 0h1v1H1V4zm1 0h1v1H2V4zm1 0h1v1H3V4zm1 0h1v1H4V4z' fill='%23e2e8f0' fill-opacity='0.6' fill-rule='evenodd'/%3E%3C/svg%3E");
    position: relative;
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
    background-position: center center !important;
    background-size: contain !important; 
    background-repeat: no-repeat !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

#map-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#map-controls .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: white;
    color: #334155;
    border: none;
}

#map-controls .btn:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cihaz Gösterimleri */
.device-marker {
    position: absolute;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    margin-top: -16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    will-change: transform;
    z-index: 10;
}

.locator-marker {
    background-color: #3b82f6;
}

.tag-marker {
    background-color: #f97316;
}

.tag-marker.static {
    background-color: #8b5cf6;
    animation: pulse 2.5s infinite;
}

/* Konum Geçmişi Stilleri */
.history-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border-radius: 50%;
    background-color: rgba(249, 115, 22, 0.5);
    border: 2px solid white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.history-time {
    position: absolute;
    white-space: nowrap;
    background-color: #1e293b;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 500;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    z-index: 11;
    transition: opacity 0.2s ease;
    opacity: 0;
}

.history-marker:hover .history-time {
    opacity: 1;
}

/* Hareket Algılama Animasyonu */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(139, 92, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
}

/* Cihaz Detayları */
.device-details {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.device-details h5 {
    font-weight: 600;
    color: #334155;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.detail-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    min-width: 150px;
    color: #64748b;
}

/* Tooltiplar */
.device-tooltip {
    position: absolute;
    background-color: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 1500;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    transform: translateY(5px);
    opacity: 0.95;
}

/* Formlar */
.form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1rem;
    background-position: right 0.75rem center;
}

.form-range::-webkit-slider-thumb {
    background: #3b82f6;
}

.form-range::-moz-range-thumb {
    background: #3b82f6;
}

/* Badge Stilleri */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: 6px;
}

.bg-warning {
    background-color: #f59e0b !important;
}

/* Modal */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #334155;
}

/* Animasyonlar ve Geçişler */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s;
}

.fade-enter, .fade-leave-to {
    opacity: 0;
}

/* Duyarlı Tasarım için Özel Ayarlar */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
    
    .map-container {
        height: 400px;
    }
    
    .device-list {
        max-height: 30vh;
    }
    
    .dashboard-card {
        margin-bottom: 15px;
    }
}

/* Scroll Performansı ve Düzgün Animasyonlar */
.device-list, #map-wrapper, #map-canvas, .device-marker, .history-marker {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
    transform: translateZ(0);
}

/* Scroll thumb stil */
.device-list::-webkit-scrollbar {
    width: 8px;
}

.device-list::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 8px;
}

.device-list::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 8px;
    border: 2px solid #f8fafc;
}

.device-list::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Animasyon optimizasyonları */
@media (prefers-reduced-motion: no-preference) {
    .device-marker, .history-marker {
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                    opacity 0.2s ease,
                    box-shadow 0.2s ease,
                    left 0.3s ease-out,
                    top 0.3s ease-out;
    }
}

/* Harita yükleme animasyonu */
@keyframes bgFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#map-canvas.loading-bg {
    animation: bgFadeIn 0.5s ease-in-out;
}

.loading-bg {
    position: relative;
}

.loading-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-bg::before {
    content: 'Yükleniyor...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    color: #334155;
    font-size: 1.2rem;
    font-weight: 500;
} 