* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    height: 100vh;
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #1a472a, #2d6a4f);
    color: white;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    position: relative;
    flex-wrap: wrap;
    gap: 5px;
}

header h1 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

header h1 i {
    color: #95d5b2;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.header-actions button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s;
    white-space: nowrap;
}

.header-actions button:hover {
    background: rgba(255, 255, 255, 0.25);
}

#map {
    height: calc(100vh - 120px);
    width: 100%;
    position: relative;
}

#chart-container {
    position: absolute;
    bottom: 75px;
    left: 10px;
    background: white;
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    width: 230px;
    z-index: 500;
}

#chart-container h4 {
    font-size: 12px;
    margin-bottom: 6px;
}

#info-panel {
    position: absolute;
    bottom: 75px;
    right: 10px;
    background: white;
    padding: 12px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    width: 250px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 500;
    transition: all 0.3s;
}

#info-panel h3 {
    color: #1a472a;
    font-size: 14px;
    margin-bottom: 8px;
    border-bottom: 2px solid #95d5b2;
    padding-bottom: 6px;
}

#farm-details p {
    font-size: 12px;
    line-height: 1.7;
    color: #333;
}

#farm-details .label {
    font-weight: bold;
    color: #1a472a;
}

#farm-details .farm-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    margin: 4px 0;
    border-right: 3px solid #2d6a4f;
}

#farm-details .farm-card .badge {
    display: inline-block;
    background: #2d6a4f;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    margin-top: 3px;
}

#farm-details .farm-card .badge.warning {
    background: #e76f51;
}

#farm-details .category-btn {
    margin: 2px;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #2d6a4f;
    background: white;
    color: #2d6a4f;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s;
}

#farm-details .category-btn:hover {
    background: #2d6a4f;
    color: white;
}

#farm-details .category-btn.active {
    background: #2d6a4f;
    color: white;
}

#stats-bar {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 10px;
    display: flex;
    gap: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 500;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #1a472a;
}

.stat-label {
    font-size: 11px;
    color: #666;
}

.leaflet-popup-content {
    font-size: 12px;
    direction: rtl;
}

.farm-marker {
    background: #2d6a4f;
    border: 2px solid #1a472a;
    border-radius: 50%;
    width: 28px !important;
    height: 28px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    header h1 { font-size: 13px; }
    .header-actions button { font-size: 9px; padding: 3px 7px; }
    #stats-bar { gap: 15px; padding: 6px 12px; }
    .stat-number { font-size: 16px; }
    #info-panel { width: 180px; right: 8px; bottom: 90px; }
    #chart-container { width: 170px; left: 8px; bottom: 90px; }
    #chart-container h4 { font-size: 10px; }
}