body {
    background-color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
}

.card-header {
    font-weight: 600;
}

.makine-item, .is-item, .ihale-item {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    border-left: 4px solid;
    background-color: #fff;
    transition: all 0.3s;
}

.makine-item:hover, .is-item:hover, .ihale-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateX(2px);
}

.makine-item.durum-hazir {
    border-left-color: #28a745;
}

.makine-item.durum-calisiyor {
    border-left-color: #007bff;
}

.makine-item.durum-bakimda {
    border-left-color: #dc3545;
}

.is-item {
    border-left-color: #17a2b8;
}

.ihale-item {
    border-left-color: #ffc107;
}

.durum-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.durum-hazir .durum-badge {
    background-color: #d4edda;
    color: #155724;
}

.durum-calisiyor .durum-badge {
    background-color: #cce5ff;
    color: #004085;
}

.durum-bakimda .durum-badge {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-sm {
    padding: 2px 8px;
    font-size: 0.75rem;
}

#harita {
    border-radius: 0 0 0.375rem 0.375rem;
}

.custom-marker-icon {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-marker-icon i {
    transform: rotate(45deg);
    color: white !important;
    font-size: 14px !important;
}

.makine-pin {
    background-color: #FF5722;
    background: linear-gradient(135deg, #FF5722 0%, #E64A19 100%);
}

.ihale-pin {
    background-color: #9C27B0;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
}

.is-pin {
    background-color: #4CAF50;
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
}

.aykome-pin {
    background-color: #FFC107;
    background: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
}

.turuncu-pin {
    background-color: #FF9800;
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.nav-tabs .nav-link {
    color: #495057;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    font-weight: 600;
}

.table-responsive {
    max-height: 600px;
    overflow-y: auto;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.form-control-color {
    height: 38px;
    width: 100%;
}

#gunlukIs_harita {
    z-index: 0;
    width: 100%;
    position: relative;
}

.modal-body #gunlukIs_harita {
    cursor: crosshair;
}

/* Leaflet harita için gerekli stiller */
.leaflet-container {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
}

/* ============================================
   MOBİL UYUMLULUK (RESPONSIVE DESIGN)
   ============================================ */

/* Tablet ve altı (768px ve altı) */
@media (max-width: 768px) {
    /* Navbar düzenlemeleri */
    .navbar-brand {
        font-size: 0.9rem;
    }
    
    .navbar-brand i {
        display: none;
    }
    
    .navbar .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
    
    .navbar .btn i {
        margin: 0 !important;
    }
    
    .navbar .btn span {
        display: none;
    }
    
    /* Tarih seçici mobilde daha küçük */
    #tarihSecici {
        width: 120px !important;
        font-size: 0.85rem;
        padding: 0.375rem 0.5rem;
    }
    
    /* Card başlıkları */
    .card-header h5 {
        font-size: 1rem;
    }
    
    .card-header i {
        font-size: 0.9rem;
    }
    
    /* Harita yüksekliği mobilde daha küçük */
    #harita {
        height: 400px !important;
    }
    
    /* Harita kontrolleri mobilde dikey yerleşim - sadece ana container için */
    .card-header > .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    /* Tarih aralığı bölümü her zaman yatay */
    .card-header .d-flex.flex-row {
        flex-direction: row !important;
        align-items: center !important;
    }
    
    /* Admin paneli card-header her zaman yatay */
    #gunluk-isler .card-header > .d-flex,
    #ekipler .card-header > .d-flex,
    #ihale-ekipler .card-header > .d-flex,
    #makine-durum .card-header > .d-flex,
    #yoneticiler .card-header > .d-flex {
        flex-direction: row !important;
        align-items: center !important;
    }
    
    .card-header label {
        font-size: 0.85rem;
    }
    
    .card-header select,
    .card-header input[type="date"] {
        font-size: 0.85rem;
        width: 100% !important;
    }
    
    #ozelTarihAraligi {
        display: none !important; /* Başlangıçta gizli */
        width: 100%;
        margin-left: 0 !important;
        margin-top: 5px;
    }
    
    #ozelTarihAraligi.show {
        display: flex !important; /* JavaScript ile gösterildiğinde */
    }
    
    #ozelTarihAraligi input {
        width: 100% !important;
        margin-bottom: 5px;
    }
    
    #ozelTarihAraligi button {
        width: 100%;
    }
    
    /* İş listeleri mobilde daha kompakt */
    .makine-item, .is-item, .ihale-item {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .makine-item strong,
    .is-item strong,
    .ihale-item strong {
        font-size: 0.95rem;
    }
    
    .makine-item small,
    .is-item small,
    .ihale-item small {
        font-size: 0.75rem;
    }
    
    .durum-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    /* Butonlar mobilde tam genişlik */
    .makine-item .btn,
    .is-item .btn,
    .ihale-item .btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    /* Admin panel tabları mobilde scroll */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    
    .nav-tabs .nav-link i {
        font-size: 0.8rem;
    }
    
    /* Admin panel card başlıkları */
    .card-header.d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    /* Admin paneli için özel - her zaman yatay */
    #gunluk-isler .card-header.d-flex,
    #ekipler .card-header.d-flex,
    #ihale-ekipler .card-header.d-flex,
    #makine-durum .card-header.d-flex,
    #yoneticiler .card-header.d-flex {
        flex-direction: row !important;
        align-items: center !important;
    }
    
    .card-header .btn {
        width: 100%;
        margin: 0 !important;
    }
    
    /* Admin paneli butonları normal genişlikte */
    #gunluk-isler .card-header .btn,
    #ekipler .card-header .btn,
    #ihale-ekipler .card-header .btn,
    #makine-durum .card-header .btn,
    #yoneticiler .card-header .btn {
        width: auto;
    }
    
    /* Admin paneli tarih seçici */
    #adminTarihSecici {
        width: auto;
        min-width: 150px;
    }
    
    @media (max-width: 576px) {
        #adminTarihSecici {
            min-width: 140px;
            font-size: 0.85rem;
        }
    }
    
    
    /* Tablolar mobilde scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    /* Modal'lar mobilde tam ekran */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-dialog-lg {
        max-width: 100%;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    /* Harita modal içinde */
    #gunlukIs_harita,
    #gunlukIs_harita_coklu {
        height: 300px !important;
    }
    
    /* Empty state */
    .empty-state {
        padding: 20px 10px;
    }
    
    .empty-state i {
        font-size: 2rem;
    }
    
    .empty-state p {
        font-size: 0.9rem;
    }
}

/* Çok küçük ekranlar (576px ve altı) */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 0.8rem;
    }
    
    .card-header h5 {
        font-size: 0.9rem;
    }
    
    #harita {
        height: 300px !important;
    }
    
    .makine-item, .is-item, .ihale-item {
        padding: 6px;
        font-size: 0.85rem;
    }
    
    table {
        font-size: 0.75rem;
    }
    
    table th,
    table td {
        padding: 0.35rem;
    }
    
    .btn-sm {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    /* Popup'lar mobilde daha küçük */
    .leaflet-popup-content {
        font-size: 0.85rem;
    }
    
    .leaflet-popup-content h6 {
        font-size: 0.9rem;
    }
    
    /* Marker'lar mobilde biraz daha küçük */
    .custom-marker-icon {
        width: 28px;
        height: 28px;
        border-width: 2px;
    }
    
    .custom-marker-icon i {
        font-size: 12px !important;
    }
}

