* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0f1a;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --border-color: #1e3a5f;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-meram: #22c55e;
    --accent-selcuklu: #3b82f6;
    --accent-karatay: #f59e0b;
    --accent-gold: #d4a843;
    --accent-red: #ef4444;
    --gradient-blue: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(180deg, #111827 0%, #0a0f1a 100%);
    border-bottom: 1px solid var(--border-color);
    height: 80px;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8942f 100%);
    color: #000;
    font-weight: 800;
    font-size: 1.5rem;
    padding: 8px 16px;
    border-radius: 8px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 2px;
}

.header-center {
    display: flex;
    align-items: center;
}

.district-tabs {
    display: flex;
    gap: 8px;
}

.district-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.district-tab:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.district-tab.meram {
    border-color: var(--accent-meram);
}

.district-tab.selcuklu {
    border-color: var(--accent-selcuklu);
}

.district-tab.karatay {
    border-color: var(--accent-karatay);
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.tab-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.tab-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.datetime-box {
    text-align: right;
}

.datetime-box .date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.datetime-box .time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.live-system {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.live-badge {
    background: var(--accent-red);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-meram);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.team-count {
    color: var(--text-primary);
    font-weight: 600;
}

/* Main Content */
.dashboard-main {
    display: flex;
    height: calc(100vh - 80px - 140px);
}

/* Side Panels */
.side-panel {
    width: 320px;
    background: var(--bg-dark);
    overflow: hidden;
}

.panel-scroll {
    height: 100%;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-scroll::-webkit-scrollbar {
    width: 4px;
}

.panel-scroll::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.panel-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

/* Project Card */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-district {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.progress-circle {
    width: 60px;
    height: 60px;
    position: relative;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle .bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 4;
}

.progress-circle .progress {
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.progress-info {
    flex: 1;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

.info-value.highlight {
    color: var(--accent-gold);
    font-weight: 700;
}

.card-stage {
    display: inline-block;
    background: rgba(212, 168, 67, 0.15);
    color: var(--accent-gold);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.footer-item {
    display: flex;
    flex-direction: column;
}

.footer-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-value {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Center Panel - Map */
.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

.map-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}

.map-icon {
    font-size: 1.2rem;
}

.map-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}

#harita {
    flex: 1;
    background: #0a1628;
}

/* Footer */
.dashboard-footer {
    height: 140px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.footer-scroll {
    display: flex;
    gap: 16px;
    padding: 16px;
    overflow-x: auto;
    height: 100%;
}

.footer-scroll::-webkit-scrollbar {
    height: 4px;
}

.footer-scroll::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.footer-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.footer-card {
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 12px;
}

.footer-card .progress-circle {
    width: 50px;
    height: 50px;
}

.footer-card .progress-text {
    font-size: 0.75rem;
}

.footer-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.footer-card-detail {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Leaflet Custom Markers */
.marker-pin-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-pulse {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(212, 168, 67, 0.35);
    animation: pulse-ring 2s infinite ease-in-out;
    pointer-events: none;
    display: none;
}

.marker-pin-wrap.active .marker-pulse {
    display: block;
}

.marker-pin {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border-color);
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.25s ease;
    z-index: 2;
}

.marker-pin-wrap.active .marker-pin {
    background: var(--accent-gold);
    border-color: #ffffff;
    color: #000;
    box-shadow: 0 4px 12px rgba(212, 168, 67, 0.4);
}

.marker-pin-wrap:hover .marker-pin {
    transform: scale(1.2);
}

.marker-label {
    position: absolute;
    bottom: -24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1;
    pointer-events: none;
}

.marker-pin-wrap.active .marker-label {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* District Colors */
.bolge-meram .marker-pin { background: var(--accent-meram); }
.bolge-selcuklu .marker-pin { background: var(--accent-selcuklu); }
.bolge-karatay .marker-pin { background: var(--accent-karatay); }

.bolge-meram.active .marker-pin { background: var(--accent-meram); border-color: #fff; }
.bolge-selcuklu.active .marker-pin { background: var(--accent-selcuklu); border-color: #fff; }
.bolge-karatay.active .marker-pin { background: var(--accent-karatay); border-color: #fff; }

/* Leaflet Tooltip */
.mahalle-tooltip {
    background: var(--bg-card) !important;
    border: 1px solid var(--accent-gold) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-family: 'Inter', sans-serif !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    font-weight: 500 !important;
    font-size: 0.8rem !important;
}

.mahalle-tooltip::before {
    border-top-color: var(--accent-gold) !important;
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1400px) {
    .side-panel {
        width: 280px;
    }
}

@media (max-width: 1200px) {
    .dashboard-header {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
    }
    
    .header-center {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }
    
    .district-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .side-panel {
        display: none;
    }
    
    .dashboard-main {
        height: calc(100vh - 160px - 140px);
    }
}
