* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f4f6f8;
  color: #333;
  margin: 0;
  padding: 20px;
}
.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
section {
  margin-bottom: 2rem;
}
h1, h2 { color: #2c3e50; }
form, select, input, button {
  margin: 5px 0;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
input, select { width: 100%; }
button {
  background: #3498db;
  color: white;
  cursor: pointer;
  font-weight: bold;
}
button:hover { background: #2980b9; }
ul { list-style: none; padding: 0; }
li {
  padding: 10px;
  background: #f0f4f8;
  margin: 5px 0;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
}
pre {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
}

#testResult {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
  white-space: pre-wrap;
  font-family: monospace;
  min-height: 100px;
}

.error-message {
  color: #e74c3c;
  margin-top: 10px;
  padding: 8px;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  display: none;
}

.error-message:not(:empty) {
  display: block;
}

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

.logout-btn {
  background: #e74c3c !important;
  padding: 8px 16px;
}

.logout-btn:hover {
  background: #c0392b !important;
}

/* Modal para detalles de conexión */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: none;
  border-radius: 10px;
  width: 80%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 15px;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
}

.connection-detail {
  margin: 10px 0;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 4px solid #3498db;
}

.connection-detail strong {
  color: #2c3e50;
}

li {
  padding: 10px;
  background: #f0f4f8;
  margin: 5px 0;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.2s;
}

li:hover {
  background: #e8f4f8;
}

/* Estilos para acciones en modal */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

.btn-edit {
  background: #27ae60 !important;
}

.btn-edit:hover {
  background: #229954 !important;
}

.btn-delete {
  background: #e74c3c !important;
}

.btn-delete:hover {
  background: #c0392b !important;
}

.close-edit {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 15px;
}

.close-edit:hover,
.close-edit:focus {
  color: #000;
  text-decoration: none;
}