* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    padding: 0;
    color: #2c3e50;
}

.container {
    max-width: 100%;
    margin: 0;
}

header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 30px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: white;
}

header h1 {
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

header p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
}

.upload-section,
.filter-section {
    background: white;
    padding: 25px 40px;
    border-bottom: 1px solid #e1e8ed;
}

.stats-section {
    background: white;
    padding: 20px 40px;
    border-bottom: 1px solid #e1e8ed;
    position: relative;
}

.map-section {
    background: white;
    padding: 20px 40px;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.btn-export-csv {
    position: absolute;
    top: 20px;
    right: 40px;
    z-index: 100;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
    transition: all 0.3s ease;
}

.btn-export-csv:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
}

.btn-export-csv:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.2);
}

h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-upload-box {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch;
    margin-bottom: 20px;
}

.upload-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.file-label {
    display: block;
    margin-bottom: 10px;
    color: #34495e;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-group label {
    display: flex;
    flex-direction: column;
}

input[type="file"] {
    display: none;
}

.btn-select {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-select:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.file-list {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    min-height: 45px;
    border: 1px solid #e1e8ed;
    flex: 1;
}

.file-item {
    display: inline-block;
    padding: 6px 12px;
    background: #e8f4f8;
    border-radius: 3px;
    margin: 3px;
    font-size: 12px;
    color: #2980b9;
    border: 1px solid #d1e7f0;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #27ae60;
    color: white;
    width: 100%;
    margin-top: 0;
}

.btn-primary:hover {
    background: #229954;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-success {
    background: #2c3e50;
    color: white;
    width: 100%;
}

.btn-success:hover {
    background: #1a252f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-inputs input[type="number"],
.range-inputs input[type="datetime-local"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d8e0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.range-inputs input:focus {
    outline: none;
    border-color: #3498db;
}

.range-inputs span {
    color: #7f8c8d;
    font-weight: 500;
}

.range-info {
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
}

.ssid-select-container {
    margin-top: 10px;
}

.btn-select-all {
    padding: 8px 16px;
    background: #34495e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-select-all:hover {
    background: #2c3e50;
}

.ssid-checkbox-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #d1d8e0;
    border-radius: 4px;
    padding: 8px;
    background: #f8f9fa;
}

.ssid-checkbox-item {
    display: block;
    padding: 10px 12px;
    margin: 4px 0;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid #ecf0f1;
}

.ssid-checkbox-item:hover {
    background: #e8f4f8;
    border-color: #3498db;
}

.ssid-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.ssid-checkbox-item label {
    cursor: pointer;
    user-select: none;
    display: inline;
    margin: 0;
    font-weight: normal;
    font-size: 14px;
    color: #2c3e50;
    text-transform: none;
    letter-spacing: normal;
}

.stats-section {
    background: #34495e;
    color: white;
}

.stats-section h3 {
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    border-left: 4px solid #95a5a6;
}

.stat-card.strong {
    border-left-color: #27ae60;
}

.stat-card.medium {
    border-left-color: #f39c12;
}

.stat-card.weak {
    border-left-color: #e74c3c;
}

.stat-label {
    color: #7f8c8d;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #2c3e50;
    font-size: 32px;
    font-weight: 700;
}

.map-section iframe {
    width: 100%;
    height: calc(100% - 60px);
    border-radius: 4px;
    border: 1px solid #d1d8e0;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: white;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    max-width: 400px;
    font-weight: 500;
}

.message.success {
    background: #27ae60;
    color: white;
}

.message.error {
    background: #e74c3c;
    color: white;
}

@media (max-width: 768px) {
    header {
        padding: 20px;
    }
    
    .upload-section,
    .filter-section,
    .stats-section,
    .map-section {
        padding: 20px;
    }
    
    .file-upload-box {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .range-inputs {
        flex-direction: column;
    }
    
    .map-section {
        height: 500px;
        min-height: 400px;
    }
    
    .map-section iframe {
        height: calc(100% - 50px);
    }
}
