.network-topology {
  position: relative;
  width: 100%;
  height: 100%;
  background: #f8f9fa;
}

/* Location Selection Styles */
.location-card {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow: hidden;
}

.location-card:hover {
  border-color: #007bff;
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,123,255,0.2);
}

.location-card .card-header {
  background: #007bff;
  color: white;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}

.location-card .card-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.location-card .card-footer .btn {
  transition: all 0.3s ease;
  font-weight: 600;
}

.location-card:hover .card-footer .btn {
  background: #007bff;
  border-color: transparent;
  color: white;
}

/* Rack Designer Styles */
.rack-designer {
  min-height: 600px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 500px;
  text-align: center;
}

.empty-state-content {
  max-width: 400px;
}

/* Rack Container */
.rack-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.rack-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

/* Rack Header */
.rack-header {
  background: #2c3e50;
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rack-info h5 {
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
}

.rack-specs {
  font-size: 0.85rem;
  opacity: 0.8;
  font-weight: 400;
}

.rack-actions {
  display: flex;
  gap: 8px;
}

.rack-actions .btn {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
}

/* Rack Frame */
.rack-frame {
  position: relative;
  background: #ecf0f1;
  margin: 0;
  overflow: hidden;
}

/* Rack Rails */
.rack-rails {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.rail {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  background: #2c3e50;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.3);
}

.rail.left {
  left: 16px;
}

.rail.right {
  right: 16px;
}

/* U Markings */
.u-markings {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 16px;
  background: #2c3e50;
  z-index: 2;
}

.u-mark {
  position: absolute;
  left: 0;
  width: 16px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #ecf0f1;
  font-weight: bold;
  border-bottom: 1px solid #34495e;
}

/* Devices Area */
.devices-area {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}

/* Empty Rack */
.empty-rack {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #bdc3c7;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: #7f8c8d;
  transition: all 0.3s ease;
}

.empty-rack:hover {
  border-color: #3498db;
  color: #3498db;
}

.empty-rack i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Device Styles */
.rack-device {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
  cursor: move;
  position: relative;
}

.rack-device:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.rack-device:active {
  cursor: grabbing;
}

.rack-device.server {
  border-left: 4px solid #3498db;
}

.rack-device.router {
  border-left: 4px solid #2ecc71;
}

.rack-device.switch {
  border-left: 4px solid #e74c3c;
}

.rack-device.firewall {
  border-left: 4px solid #f1c40f;
}

.rack-device.access-point {
  border-left: 4px solid #9b59b6;
}

.rack-device.online {
  border-right: 4px solid #2ecc71;
}

.rack-device.warning {
  border-right: 4px solid #f1c40f;
  animation: pulse-warning 2s infinite;
}

.rack-device.offline {
  border-right: 4px solid #e74c3c;
  animation: pulse-error 2s infinite;
}

@keyframes pulse-warning {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes pulse-error {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Device Panel */
.device-panel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.device-header {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-brand {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9rem;
  margin: 0;
}

.device-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rack-device:hover .device-actions {
  opacity: 1;
}

.device-actions .btn {
  padding: 4px 8px;
  font-size: 0.8rem;
}

.device-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e9ecef;
}

.device-name {
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  font-size: 1rem;
}

.device-model {
  color: #7f8c8d;
  font-size: 0.85rem;
  margin: 4px 0;
}

.device-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
}

.status-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-led.online {
  background: #2ecc71;
  box-shadow: 0 0 8px #2ecc71;
}

.status-led.warning {
  background: #f1c40f;
  box-shadow: 0 0 8px #f1c40f;
  animation: blink 2s infinite;
}

.status-led.offline {
  background: #e74c3c;
  box-shadow: 0 0 8px #e74c3c;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.device-ports {
  margin-top: 8px;
}

.port-indicators {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.port {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #e9ecef;
  border: 1px solid #dee2e6;
}

.port.active {
  background: #007bff;
  border-color: #0056b3;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .rack-designer {
    padding: 10px;
  }
  
  .rack-container {
    border-radius: 8px;
  }
  
  .rack-header {
    padding: 12px;
    flex-direction: column;
    gap: 8px;
  }
  
  .rack-actions {
    width: 100%;
    justify-content: center;
  }
  
  .device-actions {
    opacity: 1;
    position: absolute;
    top: 8px;
    right: 8px;
  }
}

/* Table Styles */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  border-collapse: collapse;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
  padding: 0.75rem;
  font-weight: 600;
  text-align: left;
  background: #f8f9fa;
}

.table tbody tr:hover {
  background-color: rgba(0,0,0,.075);
}

/* Badge Styles */
.badge {
  display: inline-block;
  padding: 0.25em 0.4em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.badge-info {
  background-color: #17a2b8;
  color: white;
}

.badge-success {
  background-color: #28a745;
  color: white;
}

.badge-warning {
  background-color: #ffc107;
  color: #212529;
}

.badge-secondary {
  background-color: #6c757d;
  color: white;
}

/* Alert Styles */
.alert {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

/* Button Styles */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-info {
  color: #fff;
  background-color: #17a2b8;
  border-color: #17a2b8;
}

.btn-outline-primary {
  color: #007bff;
  border-color: #007bff;
}

.btn-outline-primary:hover {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
}

.btn-outline-secondary:hover {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

/* Card Styles */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0,0,0,.125);
  border-radius: 0.25rem;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

.card-header {
  padding: 0.75rem 1.25rem;
  margin-bottom: 0;
  background-color: rgba(0,0,0,.03);
  border-bottom: 1px solid rgba(0,0,0,.125);
}

.card-title {
  margin-bottom: 0.75rem;
}

/* Table Styles */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
}

.table tbody tr {
  border-bottom: 1px solid #dee2e6;
}

.table tbody tr:hover {
  background-color: rgba(0,0,0,.075);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .device-visualizer-grid .col-lg-6,
  .device-visualizer-grid .col-md-6 {
    margin-bottom: 1rem;
  }
  
  .empty-state-content {
    padding: 1rem;
  }
  
  .nav-tabs .nav-link {
    padding: 0.5rem;
  }
  
  .badge {
    font-size: 85%;
  }
}

/* Network Empty State */
.network-empty-state {
  text-align: center;
  padding: 3rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.network-empty-state .empty-icon {
  font-size: 48px;
  color: #b3c6e2;
  margin-bottom: 1.5rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Styles */
.plain-modal .modal-content {
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.plain-modal .modal-header {
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
  background: #fff;
}

.plain-modal .modal-title {
  font-weight: 600;
}

.plain-modal .modal-body {
  padding: 1.5rem;
  background: #fff;
}

.plain-modal .modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
  background: #fff;
}

.plain-modal .form-control {
  border: 1px solid #ced4da;
  border-radius: 4px;
}

.plain-modal label {
  font-weight: 500;
}

.plain-modal .close {
  opacity: 0.5;
}

.plain-modal .close:hover {
  opacity: 0.75;
} 