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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    color: #2d3748;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: #718096;
    font-size: 1.1rem;
    font-weight: 400;
}

.nav {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.nav-btn.active {
    background: linear-gradient(135deg, #4c51bf, #553c9a);
    transform: translateY(-1px);
}

.section {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section h2 {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 25px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-control.required {
    border-left: 4px solid #f56565;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: #718096;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4a5568;
    transform: translateY(-1px);
}

.updates-table {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

tr:hover td {
    background-color: #f7fafc;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    min-width: 80px;
}

.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-pending {
    background: #fef5e7;
    color: #744210;
}

.status-completed {
    background: #bee3f8;
    color: #1a365d;
}

.status-on-hold {
    background: #fed7d7;
    color: #742a2a;
}

.search-box {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-box:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideInDown 0.3s ease;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-updates {
    text-align: center;
    padding: 50px;
    color: #718096;
    font-size: 1.1rem;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

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

.export-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.site-search-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.search-section {
    background: rgba(255, 255, 255, 0.5);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-input-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.site-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

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

.site-id {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 5px;
}

.site-name {
    color: #4a5568;
    font-size: 1rem;
    font-weight: 500;
}

.site-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.site-status.active {
    background: #c6f6d5;
    color: #22543d;
}

.site-status.inactive {
    background: #fed7d7;
    color: #742a2a;
}

.site-status.maintenance {
    background: #fef5e7;
    color: #744210;
}

.site-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    color: #2d3748;
    font-weight: 600;
}

.site-address {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.address-label {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.address-text {
    color: #2d3748;
    line-height: 1.5;
    font-size: 0.95rem;
}

.site-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.site-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-site-action {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-site-action:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.btn-site-action.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-site-action.primary:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.results-count {
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    text-align: center;
}

.no-sites-found {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.no-sites-found .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #cbd5e0;
}

.coordinate-link {
    color: #667eea;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.coordinate-link:hover {
    color: #4c51bf;
    text-decoration: underline;
}

.site-lookup-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.site-lookup-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.site-lookup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.site-lookup-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-close {
    background: #e2e8f0;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #cbd5e0;
    transform: scale(1.1);
}

.quick-site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.quick-site-item {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-site-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.quick-site-id {
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 5px;
}

.quick-site-name {
    font-size: 0.9rem;
    color: #4a5568;
}

/* File Upload Styles */
.file-upload-section {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.7);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
}

.upload-area:hover, .upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.02);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.upload-content h4 {
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.upload-content p {
    color: #718096;
    margin: 0;
    font-size: 1rem;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.file-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    gap: 15px;
    flex-wrap: wrap;
}

.upload-status {
    font-weight: 500;
    color: #4a5568;
    flex: 1;
}

.upload-status.success {
    color: #22543d;
}

.upload-status.error {
    color: #742a2a;
}

.file-info {
    background: #e6fffa;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #38b2ac;
    margin-top: 10px;
    font-size: 0.9rem;
}

.file-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.file-stat {
    background: white;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-stat-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2d3748;
}

.file-stat-label {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 2px;
}

.processing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #fef5e7;
    border-radius: 10px;
    border-left: 4px solid #ed8936;
    margin-top: 10px;
}

.processing-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #fed7d7;
    border-top: 2px solid #ed8936;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.user-group {
    font-size: 0.9rem;
    color: #718096;
}

.logout-btn {
    padding: 8px 20px !important;
    font-size: 0.9rem !important;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .nav {
        justify-content: center;
    }

    .nav-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 8px 6px;
    }

    .site-lookup-content {
        margin: 10px;
        padding: 20px;
    }
    
    .quick-site-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
    }
    
    .search-filters {
        grid-template-columns: 1fr;
    }

    .upload-area {
        padding: 20px;
    }

    .file-upload-section {
        margin-bottom: 20px;
    }

    .user-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}