/* TerraLux Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    overflow-x: hidden;
}

/* Header */
.header {
    background: #1e1e1e;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #00bcd4, #2196f3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.tagline {
    font-size: 0.8rem;
    color: #888;
    margin-left: 10px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    background: #333;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-icon, .team-switch {
    background: #333;
    border: none;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-icon:hover, .team-switch:hover {
    background: #444;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: #5c6bc0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Layout */
.container {
    display: flex;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #1e1e1e;
    padding: 1rem 0;
    border-right: 1px solid #333;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.sidebar-item:hover, .sidebar-item.active {
    background: #333;
    color: #fff;
    border-left-color: #00bcd4;
}

.sidebar-item.submenu {
    padding-left: 3rem;
    font-size: 0.9rem;
}

.icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(100vh - 70px);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #2a2a2a;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 188, 212, 0.1);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #00bcd4, #2196f3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #888;
    font-size: 0.9rem;
}

/* Content Sections */
.content-section {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #333;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #ccc;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: #333;
    border: 1px solid #555;
    color: #fff;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00bcd4;
}

/* Map Container */
.map-container {
    height: 400px;
    background: #333;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid #444;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #4caf50, #8bc34a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
}

.map-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #f44336;
    border-radius: 50%;
    border: 3px solid #fff;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.3s;
}

.marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.project-card {
    background: #333;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #00bcd4;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.project-card h4 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.project-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.project-actions {
    text-align: right;
}

.btn {
    background: #5c6bc0;
    border: none;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.btn:hover {
    background: #3f51b5;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #666;
}

.btn-secondary:hover {
    background: #555;
}

.btn-primary {
    background: #00bcd4;
}

.btn-primary:hover {
    background: #0097a7;
}

/* Image Viewer */
.image-viewer {
    height: 500px;
    background: #333;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid #444;
}

.satellite-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #673ab7, #9c27b0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.three-column {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 2rem;
}

/* Info Panel */
.info-panel {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #333;
    height: fit-content;
}

.info-panel h3 {
    margin-bottom: 1rem;
    color: #00bcd4;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #444;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #888;
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #444;
}

.data-table th {
    background: #333;
    font-weight: 600;
    color: #ccc;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.data-table tr:hover {
    background: #333;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    border: 2px solid #444;
    transition: all 0.3s;
}

.step.active {
    background: #00bcd4;
    border-color: #00bcd4;
}

.step.completed {
    background: #4caf50;
    border-color: #4caf50;
}

.step::after {
    content: '';
    width: 50px;
    height: 2px;
    background: #333;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
}

.step:last-child::after {
    display: none;
}

.step.completed::after {
    background: #4caf50;
}

/* AOI Cards */
.aoi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.aoi-card {
    background: #333;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #444;
    transition: transform 0.3s, box-shadow 0.3s;
}

.aoi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.aoi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #444;
}

.aoi-status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    background: #4caf50;
    color: #fff;
}

/* Sensor Cards */
.sensor-grid {
    display: grid;
    gap: 1rem;
}

.sensor-card {
    background: #333;
    border-radius: 8px;
    padding: 1rem;
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid #444;
    transition: background 0.3s;
}

.sensor-card:hover {
    background: #3a3a3a;
}

.sensor-icon {
    width: 60px;
    height: 60px;
    background: #666;
    border-radius: 8px;
}

.sensor-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.sensor-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sensor-field-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
}

.sensor-field-value {
    font-weight: 500;
}

.checkbox {
    width: 20px;
    height: 20px;
    background: #333;
    border: 2px solid #666;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.checkbox.checked {
    background: #00bcd4;
    border-color: #00bcd4;
}

.checkbox.checked::after {
    content: '?';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

/* Feature Lists */
.feature-list {
    background: #333;
    border-radius: 8px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #444;
}

.feature-item {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    background: #444;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.feature-item:hover {
    background: #555;
}

.feature-item.expanded {
    background: #666;
}

/* Analysis Results */
.analysis-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-card {
    background: #333;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #444;
    transition: transform 0.3s;
}

.result-card:hover {
    transform: translateY(-2px);
}

.result-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #00bcd4;
}

.result-label {
    color: #888;
    font-size: 0.9rem;
}

/* Legend */
.legend {
    background: #333;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #444;
}

.legend h4 {
    margin-bottom: 1rem;
    color: #00bcd4;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-red { background: #f44336; }
.legend-yellow { background: #ffc107; }
.legend-green { background: #4caf50; }

/* Status Colors */
.status-completed { color: #4caf50; }
.status-progress { color: #ff9800; }
.status-error { color: #f44336; }

/* Footer */
.footer {
    background: #1e1e1e;
    padding: 1rem 2rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.logout-link {
    color: #f44336 !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        order: 2;
    }
    
    .two-column,
    .three-column {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
    
    .header {
        padding: 1rem;
        flex-wrap: wrap;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .sensor-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .sensor-details {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}