* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.admin-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    background: #c0392b;
}

.sidebar-nav {
    padding: 20px 0;
    border-bottom: 1px solid #34495e;
}

.nav-btn {
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    color: white;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #34495e;
}

.nav-btn.active {
    background: #3498db;
}

.user-list-section {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.user-list-section h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #ecf0f1;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-item {
    padding: 12px;
    background: #34495e;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.user-item:hover {
    background: #3d566e;
}

.user-item.selected {
    background: #3498db;
}

.user-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.user-item-email {
    font-size: 12px;
    color: #bdc3c7;
}

.user-item-status {
    font-size: 11px;
    margin-top: 5px;
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
}

.user-item-status.approved {
    background: #27ae60;
    color: white;
}

.user-item-status.pending {
    background: #f39c12;
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: white;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.content-section h1 {
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
}

.section-content {
    background: white;
}

/* Users Table */
.users-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: #34495e;
    color: white;
}

.users-table th,
.users-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.users-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-approve {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-approve:hover {
    background: #229954;
}

.btn-reject {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-reject:hover {
    background: #c0392b;
}

/* Networks */
.networks-header {
    margin-bottom: 30px;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.networks-list-container {
    margin-top: 30px;
}

.networks-list-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.networks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.network-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.network-card h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.network-card p {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 14px;
}

.network-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-assign {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    flex: 1;
}

.btn-assign:hover {
    background: #8e44ad;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-delete:hover {
    background: #c0392b;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-content.large-modal {
    max-width: 1200px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Sensors Preview */
.sensors-preview {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.sensors-preview h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.sensors-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sensor-item {
    padding: 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.sensor-item strong {
    color: #2c3e50;
}

/* Map Container */
.map-container {
    margin: 20px 0;
}

.map-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

#networkMap {
    height: 500px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    position: relative;
}

.boundary-point-marker {
    background: transparent !important;
    border: none !important;
}

.map-controls {
    display: flex;
    gap: 10px;
}

/* User Checkboxes */
.user-checkboxes {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
}

.user-checkbox-item {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-checkbox-item:last-child {
    border-bottom: none;
}

.user-checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.user-checkbox-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    flex: 1;
}

